bids - SQL command to find when a document was last printed? -
i have table of document names , dates when printed. say:
aaa 2006-09-15 aaa 2007-09-15 abc 2013-08-12 abc 2012-08-12
after command executes need:
aaa 2007-09-15 abc 2013-08-12
i got close correct output involved temporary tables. i'm trying put microsoft bids , doesn't me using #temp_table.
ideas?
try this:
select doc_name, max(date_printed) your_table group doc_name;
here's fiddle can check http://sqlfiddle.com/#!2/dd156/3
Comments
Post a Comment