Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Trending in AI
Hot
Agentic AI EngineerForward-Deployed EngineerGenAI EngineerAI Architect
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
Quarterly Assessment Submission Metrics
00:00
5 left

Quarterly Assessment Submission Metrics

MediumSQL · PostgreSQL

Problem

Tell me about how you would approach a technical assessment in SQL to solve a data problem.

For the hands-on portion, use the provided assessments and assessment_submissions tables. Write a query that reports activity during the first quarter of 2025, including assessments with no qualifying submissions.

Output

  1. One row per assessment, with assessment_name, submission_count, passed_count, pass_rate, and latest_submission_at.
  2. Include assessments with no qualifying submissions, using zero counts and a zero pass rate.
  3. Sort by assessment_name ascending, then assessment_id ascending for ties.

Output details

  • Treat the first-quarter interval as inclusive at 2025-01-01 00:00:00+00 and exclusive at 2025-04-01 00:00:00+00.
  • Count a submission as passed only when result equals PASS.
  • Calculate pass_rate as passed submissions divided by qualifying submissions times 100, rounded to two decimal places.
  • Preserve latest_submission_at as NULL when an assessment has no qualifying submissions.
  • Format zero pass_rate values as 0.00.

Schema

assessments
ColumnTypeDescription
assessment_idPKINTUnique assessment identifier
assessment_nameVARCHAR(100)Assessment name
owner_teamVARCHAR(80)Team responsible for the assessment
assessment_submissions
ColumnTypeDescription
submission_idPKINTUnique submission identifier
assessment_idINTAssessment associated with the submission
candidate_idVARCHAR(40)Candidate identifier
submitted_atTIMESTAMPTZSubmission timestamp
scoreNUMERIC(5,2)Numeric assessment score
resultVARCHAR(20)Submission result, such as PASS or FAIL
Tablesassessmentsassessment_submissions
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the two tables 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.