min and max dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

having trouble with using min and max functions to return dates. need to select the min and max date for each item# from a table. multiple date entries for each item#. i already created a query to rank dates so do have ranking on each date for each item. maybe i should use rank in next query instead!?! thx.
 
having trouble with using min and max functions to return dates.
need to select the min and max date for each item# from a table.
multiple date entries for each item#. i already created a query to
rank dates so do have ranking on each date for each item. maybe i
should use rank in next query instead!?! thx.

Does this help?

SELECT DISTINCT YourTable.ItemNum, Max(YourTable.ADate) AS MaxDate,
Min(YourTable.ADate) AS MinDate
FROM YourTable
GROUP BY YourTable.ItemNum;
 
Back
Top