The following is the schema of the txn table -
ID | SrcNO | DstNO | SrcCountry | DstCountry | Type |
1 A B USA UK RECV
2 A B USA UK RECV
3 B H UK IND SEND
4 C D UK GER SEND
The aim is to capture the count of txns from a SrcNO/DstNo of UK to other countries. In other words, I want to group the count of txn's where UK is SrcCountry/DstCountry for any SrcNo/DstNo respectively -
No | Country | Send | RECV
B USA 0 2
B IND 1 0
B GER 0 0
C USA 0 0
C IND 0 0
C GER 1 0
Remark - As there isn't any txn send/recv for B with GER and C with USA,IND we have to display the count as 0 for both cases SEND/RECV.
Any help would be appreciated.