Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
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
Joining Profiles With Transactions
00:00
5 left

Joining Profiles With Transactions

MediumSQL · PostgreSQL

Problem

Perform a multi-table JOIN to combine user profile data with monthly transaction logs at Credit Karma, ensuring you account for users with no transaction history.

Use the January through March 2025 reporting period. Return one row for every user and reporting month, including users and months with no matching transactions.

Output

  1. Return user_id, full_name, state, membership_tier, month_start, transaction_count, and monthly_transaction_amount.
  2. Use zero for missing transaction counts and amounts.
  3. Order by user_id, then month_start ascending.

Schema

user_profiles
ColumnTypeDescription
user_idPKINTUnique Credit Karma user identifier
full_nameVARCHAR(100)User's full name
stateVARCHAR(2)Two-letter US state code
membership_tierVARCHAR(20)Credit Karma membership tier
credit_scoreINTUser's current credit score
monthly_transaction_logs
ColumnTypeDescription
log_idPKINTUnique transaction-log identifier
user_idINTUser associated with the transaction log
transaction_monthDATEFirst day of the transaction month
amountDECIMAL(12,2)Transaction amount recorded in the log
Tablesuser_profilesmonthly_transaction_logs
Interviewer

Your question is Joining Profiles With Transactions. 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.