Skip to content
Advertisement

SQL Sub-Query Multiple Columns [closed]

I have a dataset containing a list of recorded coronavirus cases in countries across the world through a time period of December 2019 to April 2020. I am trying to write an SQL query to give a a cumulative total for the top ten countries through this time period (i.e. the countries with the highest total at the end).

I have started this by writing a query to give a cumulative total for all countries, and then have tried to write a sub-query to limit this list to only include the data for the top ten countries.

However, the sub-query only allows for one column to be queried, and so is not working. Any solutions?

Advertisement

Answer

You can do this with only one column:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement