April 28, 2003 at 3:42 pm
Try something like this:
select userid, max([datetime]), min([datetime]) from test group by userid
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
April 28, 2003 at 3:45 pm
If you want it for each day then you try something like this.
select userid, max([datetime]), min([datetime]) from test group by userid, convert(char(10),[datetime])
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
April 28, 2003 at 4:38 pm
An article which maybe of interest to you about "The Call-Costs Problem".
Title: Counting the Costs
URL: http://www.sqlmag.com/Articles/Index.cfm?ArticleID=27592
April 28, 2003 at 4:41 pm
cheers mate, that hit the spot!![]()
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply