Get the Latest Date

2002-04-12 Thread Gavin D'Mello
Hi, I have read up quite a lot before posting this message so please bear with me if this question is trivial. I have table which stores session information of users. I have to develop a report which gives me the number of times users have logged in ( which is straightforward ) as well

RE: Get the Latest Date

2002-04-12 Thread Nicoll, Iain (Calanais)
Gavin, select username, max(access_time) last_access_time, count(*) no_of_logins from session_info_table group by username should do it Iain Nicoll -Original Message- Sent: Friday, April 12, 2002 11:43 AM To: Multiple recipients of list ORACLE-L Hi, I have read up quite a

RE: Get the Latest Date

2002-04-12 Thread John Hallas
Try the max function to pick the latest timestamp. I assume the column is of type date John -Original Message- Sent: 12 April 2002 11:43 To: Multiple recipients of list ORACLE-L Hi, I have read up quite a lot before posting this message so please bear with me if this question

Re: Get the Latest Date

2002-04-12 Thread Jan Pruner
SELECT user_id, COUNT(user_id), MAX(last_connect_time) FROM user_ses GROUP BY user_id; JP On Fri 12. April 2002 12:43, you wrote: Hi, I have read up quite a lot before posting this message so please bear with me if this question is trivial. I have table which stores session

Re: Get the Latest Date

2002-04-12 Thread Gavin D'Mello
Thanks alot Iain - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Friday, April 12, 2002 4:58 PM Gavin, select username, max(access_time) last_access_time, count(*) no_of_logins from session_info_table group by username should do it Iain

Re: Get the Latest Date

2002-04-12 Thread Madhusudhanan Sampath
: Gavin D'Mello [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Subject: Get the Latest Date Date: Fri, 12 Apr 2002 02:43:25 -0800 Hi, I have read up quite a lot before posting this message so please bear with me if this question