Select Rows With Maximum Revenue
 

Using the table playground.revenue, write a SQL query to select rows from a given table that have the maximum revenue value for each id. The resultant table should have three columns - "id", "rev", "content". Additionally, the results should be ordered in descending order by revenue.

These are the tables to query for this question:
playground.revenue
  • id int
  • rev int
  • content string
Your answer should include these columns:
  • id integer
  • rev integer
  • content varchar

Querying is only for logged in users!

Write Your Query Here (you can run selections by highlighting!)

Query Results

No queries have been run yet.