GROUP BY...easier way to think about it
Posted in 1998
Ian Clark — — source: Informix-list mailing list archive (1991-1998)
Hi All,
For goodness sake people, I'm still trying to get my aching brain
around this thing of GROUP BY :-)
One way I have tried to think about it is to view a GROUP BY statement
on 1 or more rows as though it were selecting a distinct row. That is:
SELECT field1, field2, field3
FROM table
WHERE conditions
GROUP BY 1, 2, 3
Where, in effect, the rows returned will be unique and that the
combination of the 3 fields is acting as a key.
Er, does anyone follow me or am I barking mad.
Someone pass me a gun :-)
Cheers, Ian.
Tedious 'office speak' part 3: "Let's go scuba in the think tank."