select product , sum(price) as price from table where price<1000 having price>10000
Is there an implicit group by in this query?
If that's not a requirement, this approach can add some clarity