wrote:
On Tue, Oct 5, 2010 at 9:26 PM, Min Yin wrote:
Hi There,
I have a table looks like this:
(order_id, user_id, order_time)
One user_id can have multiple orders with order_id as the primary key, now I
want to get a list of users, ordered by their latest order respectively, for
example, if
up by users.id order by
max(orders.order_time) desc;
If all I can get is a list of user_id, then can I get the list of user
records in ONE 2nd query?
Thanks!
On 10/5/2010 8:45 PM, Josh Kupershmidt wrote:
On Tue, Oct 5, 2010 at 10:26 PM, Min Yin wrote:
Hi There,
I have a table looks like
Hi There,
I have a table looks like this:
(order_id, user_id, order_time)
One user_id can have multiple orders with order_id as the primary key,
now I want to get a list of users, ordered by their latest order
respectively, for example, if user A has two orders, one on today, the
other a mo