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
SQL Experience for Twilio
00:00
5 left

SQL Experience for Twilio

HardSQL · PostgreSQL

Problem

Tell me about your SQL experience and how you use SQL to support reporting and analytics needs.

Using the supplied reporting tables, write a query that produces the March 2025 account-level messaging report while incorporating the preceding two months for comparisons. Include active accounts eligible by March 31, including accounts with no delivered messages.

Output

  1. One row per eligible account for March 2025.
  2. Columns: account_name, tier, delivered_messages, delivered_units, month_over_month_change, three_month_units, and tier_rank.
  3. Rank highest delivered units first within each tier, placing ties at the same rank and sorting final rows by tier, tier_rank, and account_name.

Schema

accounts
ColumnTypeDescription
account_idPKINTUnique Twilio account identifier
account_nameVARCHAR(100)Customer account name
statusVARCHAR(20)Current account status
signup_dateDATEAccount signup date
account_plans
ColumnTypeDescription
account_idPKINTReferenced account identifier
tierVARCHAR(30)Commercial account tier
message_events
ColumnTypeDescription
event_idPKINTUnique messaging event identifier
account_idINTAccount associated with the event
occurred_atTIMESTAMPEvent timestamp
message_statusVARCHAR(20)Delivery status of the message
unitsINTBillable messaging units
Tablesaccountsaccount_plansmessage_events
Interviewer

Your question is SQL Experience for Twilio. 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.