diff --git a/analysis/dummy_vaccination_name_frequency.csv b/analysis/dummy_vaccination_name_frequency.csv new file mode 100644 index 0000000..3595900 --- /dev/null +++ b/analysis/dummy_vaccination_name_frequency.csv @@ -0,0 +1 @@ +VaccinationName_ID,VaccinationName,Frequency diff --git a/analysis/extract_covid_vaccination_name_frequency.sql b/analysis/extract_covid_vaccination_name_frequency.sql new file mode 100644 index 0000000..6bb7891 --- /dev/null +++ b/analysis/extract_covid_vaccination_name_frequency.sql @@ -0,0 +1,14 @@ +SELECT + VaccinationName_ID, + VaccinationName, + CEILING(COUNT(VaccinationName) / 100.0) * 100 AS Frequency +FROM Vaccination +WHERE + VaccinationName_ID IN ( + SELECT VaccinationName_ID + FROM + VaccinationReference + WHERE VaccinationContent = 'SARS-2 Coronavirus' + ) +GROUP BY VaccinationName_ID, VaccinationName +ORDER BY Frequency DESC; diff --git a/project.yaml b/project.yaml index ce07f09..d3b248b 100644 --- a/project.yaml +++ b/project.yaml @@ -8,6 +8,7 @@ actions: run: > sqlrunner:latest --output output/vaccination_names.csv + --dummy-data-file analysis/dummy.csv analysis/extract_vaccination_names.sql outputs: moderately_sensitive: @@ -26,3 +27,13 @@ actions: outputs: moderately_sensitive: html: output/vaccination_names.html + + extract_covid_vaccination_name_frequency: + run: > + sqlrunner:latest + --output output/covid_vaccination_name_frequency.csv + --dummy-data-file analysis/dummy_vaccination_name_frequency.csv + analysis/extract_covid_vaccination_name_frequency.sql + outputs: + moderately_sensitive: + rows: output/covid_vaccination_name_frequency.csv