Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
SQL, Pandas, and Case Study Live Coding
00:00
5 left

SQL, Pandas, and Case Study Live Coding

MediumSQL · PostgreSQL

Problem

Complete a live coding exercise with an SQL task, a Pandas/Python data manipulation task, and a case study follow-up.

For the SQL portion, use the provided tables to summarize January 2025 pin activity and saves. Return one row per creator with at least one January pin; creators with no January pins must be excluded.

Output

  1. Columns: creator_id, creator_name, published_pins, total_saves, and avg_saves_per_pin
  2. published_pins counts January pins, while total_saves counts January saves on those pins
  3. Include qualifying creators with zero saves, round the average to two decimal places, and sort by total saves descending, then creator ID ascending

Schema

creators
ColumnTypeDescription
creator_idPKINTUnique creator identifier
creator_nameVARCHAR(100)Creator display name
pins
ColumnTypeDescription
pin_idPKINTUnique pin identifier
creator_idINTCreator who published the pin
created_atDATEDate the pin was created
saves
ColumnTypeDescription
save_idPKINTUnique save event identifier
pin_idINTPin that was saved
saved_atDATEDate the save occurred
Tablescreatorspinssaves
Interviewer

Your question is SQL, Pandas, and Case Study Live Coding. 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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.