Re: [SQL] Restriction by grouping problem.

2001-07-26 Thread Josh Berkus
Jeff, > The query I have now: > > SELECT min(datettime), sid FROM logs GROUP by sid; > > This returns the first instance of an sid in the logs table, there > can be > many rows in the table for each sid. The problem I have is that I do > not > need the SID I just need to group the min(d

[SQL] Restriction by grouping problem.

2001-07-26 Thread Jeff Barrett
The query I have now: SELECT min(datettime), sid FROM logs GROUP by sid; This returns the first instance of an sid in the logs table, there can be many rows in the table for each sid. The problem I have is that I do not need the SID I just need to group the min(datetime) by it. I need to return