Quote:
Originally Posted by r937
... except that there will be only one table involved in the query, namely, the single table that you talked about in your first post
|
I do not understand the purpose of creating a brand new quest as the following query already fetch each employee's latest sales date.
SELECT a.emp_id, max(b.dt) sales_date
FROM tmp a left join tmp b
on a.emp_id=b.emp_id
GROUP BY a.emp_id
Please give me the correct query, I can not proceed further..
Thanks.