Your question is SQL Aggregates With HAVING. Start with the requirements and the one table 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.
GoFundMe's fundraising analytics team wants to identify campaigns that have received at least $500 in completed donations. Write a PostgreSQL query using aggregation to return qualifying campaigns in descending order of their completed donation totals.
completed status, group donations by campaign, and calculate each campaign's total completed donations.500.00, ordered from the highest total to the lowest.| Column | Type | Description |
|---|---|---|
| donation_idPK | INTEGER | Unique donation identifier |
| campaign_id | INTEGER | GoFundMe campaign identifier |
| campaign_name | VARCHAR(150) | Display name of the campaign |
| amount | NUMERIC(10,2) | Donation amount in US dollars |
| donation_status | VARCHAR(20) | Donation processing status |