Question: Consider the following schema for a fictional Ecommerce database: - customers: customer _ id , first _ name, last _ name, email, age - orders:
Consider the following schema for a fictional Ecommerce database:
customers: customerid firstname, lastname, email, age
orders: orderid customerid orderdate, totalamount orderitems: orderitemid orderid productid quantity
products: productid productname, unitprice
Write an SQL query to find the total revenue generated from each customer, along with their full names firstname lastname" ordered by total revenue in descending order.Only include customers who have made at least orders.
Output: customername, totalrevenue Note: Use SELECT FROM TABLENAME to explore the data if required.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
