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
Define SQL Normalization
00:00
5 left

Define SQL Normalization

MediumSQL · PostgreSQL

Problem

Explain what normalization means in SQL and why it matters.

Describe the main normalization principles, then use the provided payment schema to show how customer, payment method, and payment data are separated. Write a query that returns the payment details needed for analysis from the normalized tables.

Output

  1. One row per payment
  2. Columns: payment_id, customer_name, payment_method, amount, payment_status, merchant_reference
  3. Include all payments with matching customer and payment method records, ordered by payment_id ascending.

Schema

customers
ColumnTypeDescription
customer_idPKINTUnique customer identifier
customer_nameVARCHAR(100)Customer display name
cityVARCHAR(80)Customer city
payment_methods
ColumnTypeDescription
payment_method_idPKINTUnique payment method identifier
method_nameVARCHAR(40)Payment method name
providerVARCHAR(60)Payment method provider
payments
ColumnTypeDescription
payment_idPKINTUnique payment identifier
customer_idINTReferences customers.customer_id
payment_method_idINTReferences payment_methods.payment_method_id
amountNUMERIC(10,2)Payment amount
payment_statusVARCHAR(20)Payment processing status
merchant_referenceVARCHAR(40)Optional merchant reference
Tablescustomerspayment_methodspayments
Interviewer

Your question is Define SQL Normalization. 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.