My MySQL version is 5.6.
I have a MySQL query that I getting error and need help to understand what I am doin wrong.
Here is the query:
select images.thumbnail16x9_file,
images.square_file,
RANK() OVER (ORDER BY images.timestamp desc) rank
from images
where images.media_id = 875021;
This is the error message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(ORDER BY images.timestamp ) rank
from images where images.media' at line 3
I get result back if I do:
select images.thumbnail16x9_file,
images.square_file
from images
where images.media_id = 875021 ;
Any insight?