I still confused about sql server, for example i have student table and i try to find maximum mark for java student
STUDENT
| id | name | mark | subject |
| 1 | jenny | 67 | db |
| 2 | mark | 74 | java |
| 3 | nala | 90 | java |
i try to get output like this
| 3 | nala | 90 |
i write this in sql, but the output is empty.
SELECT id,name,mark
FROM student
WHERE subject='Java'
AND mark=
(SELECT max(mark) FROM student);
how i'm supposed to correct it?