Reputation: 41
I have a table which consists two columns amount and description. Now i need something like Select description from tab where sum(amount) > 5000 Which is not possible i guess. Is there any custom method to get this done ?
Upvotes: 3
Views: 13519
Reputation: 1547
Try something like:
select description, sum(amount)
from tab
group by description
having sum(amount) > 5000
;
Upvotes: 8