How do I make a request that will list the names and rating of the top 3 in the tables
SELECT name, grade
FROM students
JOIN grades USING(student_id)
WHERE sex = 'm'
ORDER BY grade desc
LIMIT 3
JOIN
the tablesWHERE
ORDER BY..desc
so the bigger numbers are at the topLIMIT
SELECT TOP 3 s.name, g.grade
FROM students s
JOIN grades g ON ( s.student_id = g.student_id )
WHERE sex = 'm'
ORDER BY grade desc
JOIN
the tablesWHERE
ORDER BY..desc
so the bigger numbers are at the topTOP
at the beginning of the queryNote: you may want to include a unique ID in your results, since you may have many students with the same name, making the result ambiguous