generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from opensafely/covid-vaccine-counts
add script to report frequency of covid-19 vaccine product names
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VaccinationName_ID,VaccinationName,Frequency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters