Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 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
Build my plan
Operational Bottlenecks SQL Join
00:00
5 left

Operational Bottlenecks SQL Join

MediumSQL · PostgreSQL

Problem

Write a SQL query to join attendance, lunch service, and enrollment tables to find operational bottlenecks by school and grade at Success Academy Charter Schools.

Use active enrollment records and evaluate attendance and lunch fulfillment rates. Treat missing attendance or lunch data as an operational bottleneck.

Output

  1. One row per active school and grade.
  2. Columns: school_name, grade, enrolled_students, attendance_rate, lunch_service_rate, and bottleneck_status.
  3. Rates are percentages rounded to two decimals. Include all active school-grade combinations, order by school_name and grade ascending, and label rows as Bottleneck when either rate is below its threshold or missing.

Schema

enrollment
ColumnTypeDescription
student_idPKINTUnique student identifier
school_nameVARCHAR(100)Success Academy school name
gradeINTStudent grade level
enrollment_statusVARCHAR(20)Current enrollment status
attendance
ColumnTypeDescription
attendance_idPKINTUnique attendance record identifier
student_idINTStudent associated with the attendance record
attendance_dateDATEDate attendance was recorded
attendance_statusVARCHAR(20)Attendance status such as Present or Absent
lunch_service
ColumnTypeDescription
service_idPKINTUnique lunch service record identifier
school_nameVARCHAR(100)Success Academy school name
gradeINTGrade receiving lunch service
service_dateDATEDate of lunch service
meals_requestedINTNumber of meals requested
meals_servedINTNumber of meals served
Tablesattendancelunch_serviceenrollment
Interviewer

Your question is Operational Bottlenecks SQL Join. 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.