Hi All,
I'm having a little challenge coming up with a query. Here's the problem
I have a table of REF_NUMs and Amount. I want to group by using certain amount range and have the count of REF_NUMs in the different ranges. Below is a sample of my table.
REF_NUM TRAN_AMT
1612 2500
1613 51800000
1614 2170000
1615 100
1616 2442876.5
1617 25000
1618 250
1619 7000
1610 51500
1621 15000
1622 20
I want to group the REF_NUM with amount in the range <5000, >5001 and <50000,>50001 and know their respective counts.
Output should look like
Range Count
<5000 4
>5001 and <50000 3
>50001 11
Please how do i go about this
I'm having a little challenge coming up with a query. Here's the problem
I have a table of REF_NUMs and Amount. I want to group by using certain amount range and have the count of REF_NUMs in the different ranges. Below is a sample of my table.
REF_NUM TRAN_AMT
1612 2500
1613 51800000
1614 2170000
1615 100
1616 2442876.5
1617 25000
1618 250
1619 7000
1610 51500
1621 15000
1622 20
I want to group the REF_NUM with amount in the range <5000, >5001 and <50000,>50001 and know their respective counts.
Output should look like
Range Count
<5000 4
>5001 and <50000 3
>50001 11
Please how do i go about this