I am working on adding up and down votes to some items in the database, and displaying them ordered by the highest upvotes. How would this query look like?
How can I make something like this in SQL?
SELECT col1 col2 FROM some_table WHERE "highest number of upvotes"
Assuming
upvotesis a field in your table, you can use ORDER BY and optionally a LIMIT: