Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Determining the first and last activity date for users

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-03 : 13:37:18
Jeremy writes "Given the following two tables


users
id firstname
-- ----------
1 Bob
2 Sally
3 John



loginhistory
id userid curdate
1 1 3/20/2001 2:38:10 PM
2 1 3/20/2001 6:19:56 PM
3 2 3/20/2001 6:28:45 PM
4 1 3/20/2001 7:42:29 PM
5 1 3/20/2001 7:43:30 PM
6 2 3/21/2001 7:10:31 AM
7 1 3/21/2001 7:41:05 AM
8 1 3/21/2001 8:04:36 AM
9 1 3/21/2001 10:01:48 AM
10 3 3/21/2001 10:50:46 AM
11 1 3/21/2001 1:11:01 PM
12 1 3/21/2001 1:19:32 PM
13 3 3/24/2001 11:01:28 AM
14 1 3/24/2001 12:10:13 PM
15 2 3/24/2001 2:42:28 PM

How can I retrieve the first and last activity date for each user?
Using w2k sp1 and sql server 2000

"
   

- Advertisement -