CREATE TABLE score (id INTEGER, name TEXT, points INTEGER); INSERT INTO score VALUES (1, 'A', 30), (2, 'B', 90), (3, 'C', 60); -- LIMIT applies after ORDER BY SELECT name, points FROM score ORDER BY points DESC LIMIT 2;
LIMIT after sorting