Thread: query help
View Single Post
  #16 (permalink)  
Old 08-07-10, 22:56
sakitram sakitram is offline
Registered User
 
Join Date: Aug 2010
Posts: 13
Quote:
Originally Posted by r937 View Post
... 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.
Reply With Quote