Given a dataset of hacker bounty transactions, write an optimized SQL query to find the top three highest-paid hackers for each vulnerability category over the last quarter at HackerOne.
Use the previous calendar quarter relative to CURRENT_DATE. Include only completed bounty payments. Aggregate multiple payments for the same hacker and category, and use hacker ID as the deterministic tie-breaker.
Output
- One row per qualifying hacker and vulnerability category, with
category_name, hacker_username, total_paid, and category_rank.
- Include only the top three hackers in each category, ordered by category name and total paid descending, then hacker ID ascending.