add query for registrations
This commit is contained in:
6
queries/registration_per_day.sql
Normal file
6
queries/registration_per_day.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
SELECT DATE(PARSE_TIMESTAMP('%Y-%m-%d %H:%M:%S', REPLACE(JSON_EXTRACT(P.data, '$.createdAt'), '"', ""))) AS creation_dates, COUNT(DISTINCT JSON_EXTRACT(P.data, '$._id')) AS creation_count
|
||||
FROM `hpos-prod.firestore_export.patientData_raw_latest` AS P
|
||||
WHERE JSON_EXTRACT(P.data, '$.createdAt') <> '""'
|
||||
GROUP BY creation_dates
|
||||
ORDER BY creation_dates DESC
|
||||
LIMIT 7
|
||||
Reference in New Issue
Block a user