Question
SQL grouping
I have a table that has data like this:
EVENT - DATE
meeting - 12/1/07
party - 12/4/07
meeting - 12/9/07
I want to query the table and return all items by event type, sorted by
date.
So, the above should return:
meeting - 12/1/07
meeting - 12/9/07
party - 12/4/07
How can I do that? I'm using TSQL and thought the group by clause is what I
need, but that gives me all sorts of errors unless I include every SELECT
column in my GROUP BY statement, which seems odd and messy.
Am I missing something obvious?
-Darrel
EVENT - DATE
meeting - 12/1/07
party - 12/4/07
meeting - 12/9/07
I want to query the table and return all items by event type, sorted by
date.
So, the above should return:
meeting - 12/1/07
meeting - 12/9/07
party - 12/4/07
How can I do that? I'm using TSQL and thought the group by clause is what I
need, but that gives me all sorts of errors unless I include every SELECT
column in my GROUP BY statement, which seems odd and messy.
Am I missing something obvious?
-Darrel