Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Top Hackers by Category
00:00
5 left

Top Hackers by Category

HardSQL · PostgreSQL

Problem

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

  1. One row per qualifying hacker and vulnerability category, with category_name, hacker_username, total_paid, and category_rank.
  2. Include only the top three hackers in each category, ordered by category name and total paid descending, then hacker ID ascending.

Schema

bounty_transactions
ColumnTypeDescription
transaction_idPKINTUnique bounty payment transaction identifier
hacker_idINTHacker receiving the payment
category_idINTVulnerability category associated with the bounty
amountNUMERIC(12,2)Bounty payment amount
paid_atTIMESTAMPTime when the bounty payment was completed
payment_statusVARCHAR(20)Payment lifecycle status
hackers
ColumnTypeDescription
hacker_idPKINTUnique HackerOne hacker identifier
hacker_usernameVARCHAR(80)Public hacker username
country_codeVARCHAR(2)Optional two-letter country code
vulnerability_categories
ColumnTypeDescription
category_idPKINTUnique vulnerability category identifier
category_nameVARCHAR(100)Vulnerability category name
severity_bandVARCHAR(20)Typical severity classification
Tablesbounty_transactionshackersvulnerability_categories
Interviewer

Your question is Top Hackers by Category. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.