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
Start free
Aggregate January Records by Dataset
00:00
5 left

Aggregate January Records by Dataset

MediumSQL · PostgreSQL

Problem

Describe your experience with SQL and how you would use it to manipulate datasets at YipitData.

Using the provided dataset_records table, demonstrate this by summarizing records collected during January 2025. Include only rows with a non-null dataset name.

Output

  1. One row per dataset, with dataset_name, total_records, and average_daily_records.
  2. Include the total and average of record_count for the period.
  3. Order by total_records descending, then dataset_name ascending.

Schema

dataset_records
ColumnTypeDescription
record_idPKINTUnique record identifier
dataset_nameVARCHAR(100)Name of the tracked dataset
categoryVARCHAR(50)Dataset category
collected_onDATEDate on which records were collected
record_countDECIMAL(12,2)Number of records collected
Tablesdataset_records
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the one table are in the Question tab.

Sign up free to run or submit. Log in
CodePostgreSQL
Sign up free to run your code. Your draft is saved.Run with a free accountLog inLn 1
Run your query to see results here.