Skip to main content
All Problems
hard0% acceptance

Customers with Both Accounts and Loans (EXISTS)

The cross-sell team wants to identify customers who have at least one active account AND at least one active loan. Use EXISTS subqueries for both checks. Return first_name, last_name, and email. Sort by last_name, first_name.

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