0

I am trying to create a mysql script that will search for results while at the same time filtering out duplicates of a particular field, I did some research and the code I found came in the format of something like this:

SELECT * FROM sites s INNER JOIN (SELECT h.*, row_number() over (PARTITION by muleid) as seqnum from history h ) h WHERE acceptid=2;

But it came up with the error:

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 '(PARTITION by muleid) as seqnum from history h ) h WHERE acceptid=2' at line 1

Is there anyone that can help?

spaghety
  • 59
  • 1
  • 6

0 Answers0