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 for Channel Sign-Ups and Growth
00:00
5 left

SQL for Channel Sign-Ups and Growth

MediumSQL · PostgreSQL

Problem

Turing's Product Growth team needs a weekly view of candidate acquisition performance. Write a PostgreSQL query that reports sign-ups and application conversion by acquisition channel.

A candidate is considered converted when they submit at least one Turing application within seven days after signing up. Include acquisition channels with sign-ups even when no candidate converted.

Requirements

  1. Group sign-ups by the Monday of the signup week and acquisition_channel.
  2. Calculate weekly sign-ups, converted candidates, and conversion rate as a percentage.
  3. Calculate week-over-week sign-up growth for the same acquisition channel. Return NULL when no prior-week comparison exists.
  4. Include the supplied reporting period from January 1 through January 31, 2025, and sort by week followed by acquisition channel.

Schema

users
ColumnTypeDescription
user_idPKINTUnique Turing candidate identifier
signup_atTIMESTAMPTimestamp when the candidate created an account
acquisition_channelVARCHAR(50)Marketing acquisition source
applications
ColumnTypeDescription
application_idPKINTUnique application identifier
user_idINTCandidate who submitted the application
submitted_atTIMESTAMPApplication submission timestamp
Tablesusersapplications
Interviewer

Your question is SQL for Channel Sign-Ups and Growth. 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.