Skip to content

Conversation

@yashcodesman
Copy link

WITH
france_cases AS (
SELECT
date,
SUM(cumulative_confirmed) AS total_cases
FROM
bigquery-public-data.covid19_open_data.covid19_open_data
WHERE
country_name="France"
AND date IN ('2020-01-24',
'2020-05-10')
GROUP BY
date
ORDER BY
date)
, summary as (
SELECT
total_cases AS first_day_cases,
LEAD(total_cases) OVER(ORDER BY date) AS last_day_cases,
DATE_DIFF(LEAD(date) OVER(ORDER BY date),date, day) AS days_diff
FROM
france_cases
LIMIT 1
)
select first_day_cases, last_day_cases, days_diff, POW((last_day_cases/first_day_cases),(1/days_diff))-1 as cdgr
from summary

vickyjnv and others added 18 commits October 8, 2020 18:38
Update Getting Started: Create and Manage Cloud Resources: Challenge
Update analyze-images.py in Integrate with Machine Learning APIs: Challenge Lab
…Insights from Data with BigQuery: Challenge Lab(Updated task 9)
Insights from Data with BigQuery: Challenge Lab
In task 9 instead of POWER(), it should be POW(). It was not excecuting with POWER().
Update Insights from Data with BigQuery: Challenge Lab(Updated task 9)
edited the code so that it is easy to understand by anyone ,when to use which command by introducing steps in it.
Update Build and Secure Networks in Google Cloud: Challenge Lab
Update Exploring the Public Cryptocurrency Datasets Available in BigQ…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants