Hi,
I have data like below
customer_id city timestamp amount
123 hyderbad currentdate 130
123 hyderbad currentdate 200
200 bangalore currentdate 300
300 bangalore currentdate 400
Customer_id can be multiple times
I have written the following code for top 10 sales based on customer_id as below.
select * from (select customer_id, sum(amount) as totals from customers group by customer_id order by totals desc) where rownum <=10;
I am not able to incorporate city wise top 10 customers.
Please help me to achieve this.
Regards,
Chandra