Thread: query help
View Single Post
  #9 (permalink)  
Old 08-07-10, 13:53
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by sakitram View Post
SELECT max(date_time) FROM emp_monthly_sales group by emp_id.
this is syntactically correct, but not semantically

it does give you a result set of dates, and they do happen to be the last date for each employee, however, all you get is the dates... so this query has a very serious logical shortcoming -- you can't tell whose dates they are!!
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote