Questions
Questions
Retrieve the names of customers who have purchased products with a price higher than the
average price of products in each category:
FROM customers c
FROM products p2
Q. Find the products that have been sold at least twice and list their details:
SELECT p.*
FROM products p
WHERE p.product_id IN (
SELECT product_id
FROM sales
GROUP BY product_id
Q. Retrieve the names and emails of customers who have not made any purchases:
FROM customers c
FROM sales);
Q.Find the total sales amount for each customer in the last month:
FROM customers c
GROUP BY c.cust_id;