Each GROUP BY expression must contain at least one column that is not an outer reference

  • Hi all,

    select * from [table_name]

    where Date_Signed in (select Date_Signed from [table_name] group by Date_Signed having COUNT(Date_Signed)>1)

    is giving error:

    Each GROUP BY expression must contain at least one column that is not an outer reference

    How can i achieve this?

  • HI where is the DDL,but you can try sql_code below anyway

    select * from [table_name] a

    where (select COUNT(1) from [table_name] b where a.Date_Signed=b.Date_Signed)>1

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply