Now，We hive a table of Consumption details.(A person has multiple consumption records ).
First ,we want to Calculate a person's total consumption（need to agg）.
Then we want to get all the people who consume more than $500.（It's the total, not the details.）.
So we need to aggregate twice on the basis of calculating a person's total consumption amount.
Like the sql:
from (select *
from (select mobile_nbr, sum(trans_amt) total_trans_amt
group by mobile_nbr) t
where t.total_trans_amt > 500) tt
Excuse me, do es support this query?
best wish to you