Last post Jun 24, 2010 01:24 PM by Jester98x
Jun 24, 2010 03:14 AM|uthappa|LINK
if we are trying to add the several columns in select statement and only one condition in group by.
how can we do that ??
LEFT OUTER JOIN HRA hra ON hra.HcnID = ContactTracking.HcnID
AND ContactTracking.Call_end_time is not null
AND ContactTracking.HcnID NOT IN (Select HcnID FROM TestIDs)
AND Contact_ID in ('122734','122738')
GROUP BY Contact_ID
Jun 24, 2010 01:24 PM|Jester98x|LINK
Group By needs to list no aggregated values, so in your case you can't do it with just one condition.
A helpful article to understand Group By
Looking at the query I'm not sure why you would want to use a Group By clause anyway. Can you provide more detail on what you are trying to achieve?