Jump to content

Finding MAX() of several categories?


davej

Recommended Posts

I saw an interesting question a few days ago. They had a table with a compound primary key and they wanted to select the MAX() entries for each category. So the table was like... dept CHAR(6),project_no INT,description CHAR(15),manager CHAR(15)CONSTRAINT PRIMARY KEY(dept, project_no) They wanted to find the highest project_no in each department. --Edited: Corrected the example.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...