TASK #203 · MediumA user was credited with someone else's bookings
Your brief
The report shows how much each user has spent on bookings.
A user complained to support: the report credits them with more than they actually spent. Their bookings were checked by id, and none of them is extra.
Output name (user name) and total_spent (sum of total over all their bookings).
A user complained to support: the report credits them with more than they actually spent. Their bookings were checked by id, and none of them is extra.
Output name (user name) and total_spent (sum of total over all their bookings).
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
usersid, name, email, email_verified_at, password, phone_numberreservationsid, user_id, room_id, start_date, end_date, price, totalroomsid, home_type, address, has_tv, has_internet, has_kitchen, has_air_con, price, owner_id, latitude, longitudereviewsid, reservation_id, rating