Loading...
Transaction Share of User Spend
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- mid
Problem
For each transaction, show the transaction ID, username, the transaction amount, and the ratio of that transaction's amount to the user's overall total as a decimal. Each username is unique and each user has at most one transaction per day.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.