I have a TEMP_TABLE
with the below data
SOURCE - Number
DESTINATION- Number
COUNT- Number (Total count of transactions)
SUM- Number (Total sum of transactions)
Sample data:
SOURCE DESTINATION COUNT SUM
123123123 99009900 65 1000000
123123123 88880303 12 90000
191113111 98980101 277 5000000
191113111 77778585 5 20000
191113111 56789547 740 75000000
I'm trying to get Top 150 results
per source number with the destination number
based on the value of COUNT
. If 123123123
has 200 rows in the table with multiple destinations, I trying to get the top 150 results of 123123123
and exclude the other 50 rows.