0 votes
in Oracle by
Calculate the total revenue generated by each customer in the last three months.

1 Answer

0 votes
by
SELECT customer_id, SUM(revenue) AS total_revenue

FROM sales

WHERE transaction_date >= TRUNC(SYSDATE) - INTERVAL '3' MONTH

GROUP BY customer_id;

Related questions

0 votes
asked Jan 23 in Oracle by SakshiSharma
0 votes
asked Jan 17 in Oracle by AdilsonLima
...