Quote:
Originally Posted by mike_bike_kite
that's actually the latest date for all employees.
|
SELECT max(date_time) FROM emp_monthly_sales group by emp_id.
I think the answer is the following.
SELECT a.emp_id, max(b.date_time), b.sales_amount
FROM emp_monthly_sales a, emp_monthly_sales b
WHERE a.emp_id=b.emp_id
GROUP BY a.emp_id
I'm not sure.