Build a report showing each customer's transaction activity. Return first_name, last_name, the total number of transactions (txn_count), and the total transaction amount (total_amount). Join customers to accounts to transactions. Only include customers who have at least one transaction. Order by total_amount descending.
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