Your question is SQL Rolling Window Analytics. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
The U.S. Food and Drug Administration uses the FDA Adverse Event Reporting System, or FAERS, to monitor reported adverse events. Write a PostgreSQL query that summarizes oncology-related reports by month for calendar year 2024.
therapeutic_area is Oncology.| Column | Type | Description |
|---|---|---|
| report_idPK | BIGINT | Unique FDA FAERS report identifier |
| drug_product_id | INT | Referenced drug product identifier |
| received_date | DATE | Date FDA received the report |
| report_source | VARCHAR(40) | Source of the adverse event report |
| Column | Type | Description |
|---|---|---|
| drug_product_idPK | INT | Unique reported drug product identifier |
| product_name | VARCHAR(120) | Reported drug product name |
| therapeutic_area | VARCHAR(60) | Therapeutic area associated with the product |