Just get the syntax right - see the documentation
A Guide to MySQL RANK Funtion By Practical Examples[
^]
Try this
SELECT subjects,names, marks, rank()
over ( partition by subjects order by marks desc ) my_Rank
FROM result;
I've removed the
AS
and given it a name that is not a reserved word.
If it still doesn't work then it's likely that you are using an out-of-date version of MySQL as the "many people" who are saying there is no over clause in MySQL are wrong.