Jump to content

Finding MAX() of several categories?


davej
 Share

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.

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...