🎁 Exclusive Offer! Join our Telegram Channel to get **special discounts** and updates! 🚀

🚀 Struggling with coding interviews? We've got you covered! 💡 Practice real questions, sharpen your skills, and land your dream job! 🎯
Question 71 - 100% Working Solution | Buy Now

Description

3 Live
User Transaction Report for 2023 In the digital age, payment systems are essential for online transactions. For businesses managing these systems, understanding user activity is key to optimizing services and enhancing engagement. A development team is tasked with creating a report that shows: The total number of transactions made by each user. The total sum of those transactions. Analyzing these patterns will help identify highly active users and those who may need additional engagement. Requirements The output of the report should include the following columns: - email: The email address of the user. - total_transactions: The total number of transactions made by the user. - total_amount: The total value of the transactions (rounded to two decimal places, including trailing zeros if needed, e.g., 500.00). The results should be sorted in ascending order by email. Note: Only include transactions that occurred in the year 2023. Schema Table: users id (INT): The identifier of the user email (VARCHAR(255)): The email address of the user Table: transactions user_id (INT): The reference to the user amount (DECIMAL(5,2)): The amount of the transaction created_at (VARCHAR(19)): The date and time of the transaction Foreign Key: user_id references users(id)

Asked in: DOCUSIGN

Image of the Question

Question Image

All Testcases Passed ✔



Passcode Image

Solution


Please login to view the solution