Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 feedbackSuccess 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 Assets Over Rolling 30 Days
00:00
5 left

Top Assets Over Rolling 30 Days

MediumSQL · PostgreSQL

Problem

Write a query to identify top-performing assets based on user transaction volume over a rolling 30-day window at Robinhood.

Use completed transactions and define the rolling window as the 30-day period ending at the latest transaction timestamp. Return the top three transaction-volume ranks, including ties.

Output

  1. One row per included asset with asset_id, symbol, transaction_count, active_users, total_notional, and volume_rank.
  2. Include only completed transactions in the rolling window, and include all assets tied within the top three ranks.
  3. Order by volume_rank, transaction_count descending, total_notional descending, and asset_id.

Schema

assets
ColumnTypeDescription
asset_idPKVARCHAR(20)Unique Robinhood asset identifier
symbolVARCHAR(12)Tradable asset symbol
asset_nameVARCHAR(100)Display name of the asset
asset_classVARCHAR(30)Asset classification
transactions
ColumnTypeDescription
transaction_idPKINTUnique transaction identifier
user_idINTRobinhood user who placed the transaction
asset_idVARCHAR(20)Asset involved in the transaction
executed_atTIMESTAMPTimestamp when the transaction was executed or recorded
statusVARCHAR(20)Transaction processing status
notional_valueNUMERIC(14,2)Transaction value in US dollars
Tablesassetstransactions
Interviewer

Your question is Top Assets Over Rolling 30 Days. Start with the requirements and the two 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.