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
API With Data Manipulation
00:00
5 left

API With Data Manipulation

MediumSQL · PostgreSQL

Problem

Describe an API you built that included some data manipulation.

For the SQL portion, write a query over the provided API tables to produce an endpoint-level report for January 2026. Include only POST, PUT, and PATCH requests in that month, while retaining endpoints with no matching requests.

Output

  1. One row per endpoint, with route, http_method, request_count, mutation_count, total_rows_changed, and successful_request_count.
  2. Count mutations and changed rows associated with included requests; count successful requests with status codes from 200 through 299.
  3. Order by route, then http_method ascending.

Schema

api_endpoints
ColumnTypeDescription
endpoint_idPKINTEGERUnique endpoint identifier
routeVARCHAR(100)API route path
http_methodVARCHAR(20)Configured HTTP method
api_requests
ColumnTypeDescription
request_idPKINTEGERUnique API request identifier
endpoint_idINTEGERReferenced endpoint
http_methodVARCHAR(20)Method used by the request
requested_atTIMESTAMPRequest timestamp
status_codeINTEGERHTTP response status code
api_mutations
ColumnTypeDescription
mutation_idPKINTEGERUnique mutation identifier
request_idINTEGERRequest that caused the mutation
rows_changedINTEGERNumber of rows changed by the mutation
Tablesapi_endpointsapi_requestsapi_mutations
Interviewer

Your question is API With Data Manipulation. 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.