Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Compare Card Spend Across Segments

Medium
SQL & Data ManipulationJoinsCase WhenAggregations
Asked 1mo ago|
American Express
American Express
Asked 1 times

Problem

Write a PostgreSQL query that compares June 2024 cardmember performance across region and segment. Your result should show active cardmembers, total billed amount, average billed amount per active cardmember, and a label indicating whether each group is above or below the overall portfolio average. Only keep groups with at least 2 active cardmembers.

Schema

ColumnTypeDescription
customer_id
customer_name
region
segment
signup_date
ColumnTypeDescription
transaction_id
customer_id
transaction_date
billed_amount
merchant_category
Practicing as: Financial Analyst interview at American Express

Hi, I'll play your American Express interviewer for the Financial Analyst role. Candidates describe these interviews as mostly positive and moderately difficult, so expect me to be friendly and conversational. Take your time with the question above and answer like we're in the room.

You are practicing as a guest. Sign up free to run your code against the sample data. Your draft stays right here.

Sign up freeI have an account
SELECT ...
FROM ...
JOIN ... ON ...
GROUP BY ...
HAVING ...
ORDER BY ... DESC;
Sign up to unlock solutions
American Express Financial Analyst Interview Questions
Next questions
American ExpressCompare Spend Across Card SegmentsMediumAmerican ExpressCompare Card Spend to Prior PeriodsMediumEquifaxCompare Segment Performance Over TimeMedium