I'm trying to display just the top two rows in Oracle, however I've not been able to come across anything that works.
I currently have
SELECT BRANCH.BRANCHID, BRANCHNAME, AVG(SESSIONPRICE)
FROM BRANCH, SESSIONS
WHERE SESSIONS.BRANCHID = BRANCH.BRANCHID
GROUP BY BRANCHNAME, BRANCH.BRANCHID
ORDER BY AVG(SESSIONPRICE) DESC
Which returns this
B2 A 18.67
B4 B 17.57
B3 C 15.44
B1 D 13.99
However, I only want the top two rows of this table.
How on earth do I do this?