Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause [duplicate]
Suppose I have the following table T: a b ——– 1 abc 1 def 1 ghi 2 jkl 2 mno 2 pqr And I do the following query: SELECT a, b FROM T GROUP BY a The output should have two rows, one row where a=1 and a second row where a=2. But what should … Read more