I am trying MySQL sub queries to solve a small problem i.e. find the highest marks from a perticular city named kolkata
SELECT max(marks)
FROM newstudent
WHERE city=(
SELECT * FROM newstudent WHERE city = “kolkata”);
this is my table:
(101,”arka”,95,”delhi”),
(102,”bristi”,76,”kolkata”),
(103,”chetan”,85,”mumbai”),
(104,”denial”,53,”kolkata”),
(105,”eman”,92,”delhi”);
and I expecting:
MAX(marks) city
76 kolkata
New contributor
Suman Bhowmick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.