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 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
Basketball Data Scenario Analysis
00:00
5 left

Basketball Data Scenario Analysis

MediumSQL · PostgreSQL

Problem

Tell me about a time you analyzed basketball game data scenarios to answer a specific question.

For this SQL exercise, use the Oklahoma City Thunder game and team statistics tables to compare three-point shooting in regular-season wins and losses.

Output

  1. One row per result type, either Win or Loss.
  2. Return outcome, games_analyzed, average_three_point_percentage, and average_point_margin.
  3. Include only games with matching Oklahoma City statistics and order results with Win before Loss.

Schema

games
ColumnTypeDescription
game_idPKINTUnique game identifier
game_dateDATEDate on which the game was played
seasonINTSeason year
game_typeVARCHAR(30)Game classification, such as Regular Season or Playoffs
okc_scoreINTOklahoma City score
opponent_scoreINTOpponent score
team_game_stats
ColumnTypeDescription
stat_idPKINTUnique team-game statistics identifier
game_idINTReferenced game identifier
team_abbreviationVARCHAR(5)Team abbreviation
three_pointers_madeINTThree-point field goals made
three_pointers_attemptedINTThree-point field goals attempted
Tablesgamesteam_game_stats
Interviewer

Your question is Basketball Data Scenario Analysis. Start with the requirements and the two 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.