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
SQL Data Organization for Extraction
00:00
5 left

SQL Data Organization for Extraction

MediumSQL · PostgreSQL

Problem

What programming software do you use, and how would you arrange data for future extraction?

Assume software tools and usage events are stored in separate tables. Write a query that produces a reusable extract for active tools used during 2025, while retaining active tools with no usage during that period.

Output

  1. One row per active software tool, with tool_name, category, engineer_count, usage_count, last_used_on, and usage_status
  2. Include tools with no qualifying usage and label them unused
  3. Order by usage_count descending, then tool_name ascending

Schema

software_tools
ColumnTypeDescription
tool_idPKINTUnique software tool identifier
tool_nameVARCHAR(100)Software tool name
categoryVARCHAR(50)Tool category
is_activeBOOLEANWhether the tool should appear in current extracts
software_usage
ColumnTypeDescription
usage_idPKINTUnique usage event identifier
tool_idINTReferenced software tool
engineer_nameVARCHAR(100)Engineer associated with the usage event
used_onDATEDate of the usage event
proficiency_levelVARCHAR(30)Reported proficiency level
Tablessoftware_toolssoftware_usage
Interviewer

Your question is SQL Data Organization for Extraction. 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.