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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -