Why is below an invalid sql statement in mysql. It works perfectly in oracle.
SELECT originalAmount,fees,id FROM 
(SELECT originalAmount,fees,id, ROW_NUMBER() OVER (PARTITION BY transaction_number ORDER BY eventdate ASC) RANK FROM kir_records where customerid= 1704) 
WHERE RANK = 1;
I immediately get a syntax error as soon as paste this in mysql workbench.
Error:
Select is invalid at this position. Expecting '(' at first select.
Is there a workaround to make this work ?
 
    