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
ExperiencesCoaching
New
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
Get started
SQL and Python Data Work
00:00
5 left

SQL and Python Data Work

MediumSQL · PostgreSQL

Problem

Tell me about your experience using SQL and Python to solve data analysis problems.

For the hands-on SQL portion, use the provided users and analytics_events tables to summarize valid January 2025 activity for every user. Return one row per user, including users without qualifying events, and sort by total event value descending and user ID ascending.

Output

  1. Columns: user_id, user_name, qualifying_event_count, conversion_count, total_event_value, latest_event_at
  2. Include only January 2025 events with supported event types and nonnegative or NULL event values.

Schema

users
ColumnTypeDescription
user_idPKINTUnique user identifier
user_nameVARCHAR(100)User display name
emailVARCHAR(255)User email address
analytics_events
ColumnTypeDescription
event_idPKINTUnique event identifier
user_idINTUser associated with the event
occurred_atTIMESTAMPEvent timestamp
event_typeVARCHAR(50)Type of analytics event
channelVARCHAR(50)Acquisition or interaction channel
event_valueDECIMAL(10,2)Optional numeric value associated with the event
Tablesusersanalytics_events
Interviewer

Your question is SQL and Python Data Work. 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.