Skip to main content
All Problems
medium0% acceptance

Each Customer's First Transaction

For every customer who has at least one transaction, find their earliest transaction. Return first_name, last_name, the transaction_date, type, and amount of their first transaction. If a customer has multiple transactions on the same earliest date, return the one with the smallest transaction id. Order by transaction_date ascending.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
emailTEXT
phoneTEXTNULL
date_of_birthTEXT
cityTEXT
stateTEXT
countryTEXT
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute