How do you handle large datasets?
Using a single PostgreSQL table, write a query that produces a compact summary of processed records. Return the three categories with the most processed records, along with their record counts and total amounts.
category, record_count, and total_amountrecord_count descending, then category ascending to break ties| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique record identifier |
| category | VARCHAR(100) | Category assigned to the record |
| status | VARCHAR(30) | Processing status of the record |
| amount | DECIMAL(12,2) | Amount associated with the record |