--- Daevid Vincent [EMAIL PROTECTED] wrote:
Well I think this is mostly working. I have a 'NULL' user ID which is
'system' that I need to get into here, but I think I'm mostly on
track...
There are lots of ways to accomplish this task it seems. ALL of which
would
be so much easier if
vmware reviewit # mysql --version
mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline 5.1
Given two tables:
CREATE TABLE `logs` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned default '0',
`created_on` timestamp
On 4/28/06, Daevid Vincent [EMAIL PROTECTED] wrote:
vmware reviewit # mysql --version
mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline
5.1
Given two tables:
CREATE TABLE `logs` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`user_id`
-Original Message-
From: Alex Arul [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 27, 2006 11:28 PM
To: Daevid Vincent
Cc: mysql@lists.mysql.com
Subject: Re: Help with subqueries...
On 4/28/06, Daevid Vincent [EMAIL PROTECTED] wrote:
vmware reviewit # mysql --version
Thanks Alex, that got me started. I don't understand why I
had to use IN
when the example uses = but at least it kinda works...
The problem is now that I can't get the right data.
mysql select max(created_on), user_id, id from logs group by user_id;
|
+-+-+-++--+
From: Alex Arul [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 2:18 AM
To: Daevid Vincent
Subject: Re: Help with subqueries... MAX
On Fri, 2006-04-28 at 00:13 -0700, Daevid Vincent wrote:
The problem is now that I can't get the right data.
mysql select max(created_on), user_id, id from logs group by user_id;
+-+-++
| max(created_on) | user_id | id |