I have two separate BigQuery queries where I took the sum of confirmed cases for a certain date and grouped them by region and ordered in descending order by cases.
SELECT region, SUM(confirmed_cases) AS total_cases FROM provincedata WHERE date BETWEEN '2020-08-01' AND '2020-08-02' GROUP BY region ORDER BY total_cases DESC
SELECT region, SUM(confirmed_cases) AS total_cases FROM provincedata WHERE date BETWEEN '2020-08-31' AND '2020-09-01' GROUP BY region ORDER BY total_cases DESC
I want to calculate the difference between total_cases in the first and second queries and group and order by region and descending order by the difference in descending order.