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
- L4
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.
Summary
Each transaction's share of the whole.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.