Search code examples
sqloracle-databasetop-n

SELECT most experienced person


I have to make a table of basketball players and a query which finds the player with the most experience I have tried

SELECT firstName, lastName, MAX(experience) FROM Player

but I'm assuming thats wrong.

So basically I want to find the player with the highest experience (data type set as an INT)

Thank you!! :D


Solution

  • SELECT  firstName, 
            lastName, 
            experience
    FROM    Player
    WHERE   experience = (SELECT MAX(experience) FROM Player)