sql - Counting a number of purchases with the same data values in oracle -


i have following table

how can write sql statement find out how many purchases there has been there @ least 1000 other purchases same servicetype, paymenttype , gst values?

i know need use count aggregate , think query should start this

thanks

i think need count instead of sum. or sum amount if need total amount.

select count(purchaseno) purchase group servicetype, paymenttype, gst having count(purchaseno) >= 1000 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -