ount(A3.ACCOUNT_ID) = 1
) as U1
on A1.ID = U1.ID
where A1.ACTIONDATE like '2008-08-01 02:00%'
and U1.ID is NULL
) as D
);
Thanks for the pointers ;-)
-Original Message-
From: Magnus Smith [mailto:[EMAIL PROTECTED]
Sent: 07 August 2008
e '2008-08-01 02:00%'
group by ACCOUNTACTION.ACCOUNT_ID
having count(ACCOUNTACTION.ACCOUNT_ID) > 1
union
select ACCOUNTACTION.ID, ACCOUNTACTION.ACCOUNT_ID from ACCOUNTACTION
where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%'
group by ACCOUNTACTION.ACCOUNT_ID having c
UNTACTION
where ACCOUNTACTION.ACTIONDATE like '2008-08-01 02:00%'
group by ACCOUNTACTION.ACCOUNT_ID
having (count(ACCOUNTACTION.ACCOUNT_ID) > 1 and ACCOUNTACTION.ID
<http://accountaction.id/> =min(accountaction.id);
I would use the first select statement.
I have the following two tables
ACCOUNTACTION
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| ID| bigint(20) | NO | PRI