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 and Python Interview Focus
00:00
5 left

SQL and Python Interview Focus

MediumSQL · PostgreSQL

Problem

Tell me about your experience with SQL and Python and what kinds of problems you typically solve with them.

For the SQL portion, demonstrate a representative data-manipulation solution using the provided analyst and work-log tables. Return active analysts even when they have no completed work entries.

Output

  1. One row per active analyst with analyst_name, completed_entries, and total_hours
  2. Include only completed work entries in the metrics
  3. Sort by total_hours descending, then analyst_name ascending

Schema

analysts
ColumnTypeDescription
analyst_idPKINTUnique analyst identifier
analyst_nameVARCHAR(100)Analyst display name
is_activeBOOLEANWhether the analyst is currently active
work_logs
ColumnTypeDescription
work_log_idPKINTUnique work-log identifier
analyst_idINTAnalyst associated with the work entry
statusVARCHAR(20)Work-entry status
hoursNUMERIC(8,2)Hours recorded for the entry
work_dateDATEDate of the work entry
Tablesanalystswork_logs
Interviewer

Your question is SQL and Python Interview Focus. 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.