I need an SQL query that orders a column by a ranking system, but if the ranks are the same, use the id as only a secondary, last resort order. Can anyone help me accomplish this? I have the system working with ORDER BY, but if rankings are the same, it screws up the system. I only need the primary, secondary ORDER BY code and not a whole query.
Share
You just need to specify two conditions (separated by commas) in your ORDER BY clause: