Re: [SQL] SQL problem: bank account

2003-06-03 Thread Erik G. Burrows
to do with any correlated sub-select statement. Thanks! > "Erik G. Burrows" <[EMAIL PROTECTED]> writes: > > I need to get the most recent transaction for each customer. I need only > > the transaction ID, but the entire row would be best. > > If you don't

[SQL] SQL problem: bank account

2003-06-02 Thread Erik G. Burrows
where id = and ts = (select max(ts) from bank_account ba2 where ba2.customer_id = bank_account.customer_id); However, doing this for all 40,000 customers is not workable as a manual process. My last resort is to do it this way to pre-generate the report, but I'd far rather do it real-ti