Hi All,
I have a table with below structure, with a sample entry for 1 country:
ID Date Event CountryCode TxnID
1 22/05/2015 ABC 123
111
2 23/05/2015 XYZ 123 111
3 20/05/2015 XYZ 123 222
4 21/05/2015 ABC 123 222
So, I need to get a count like:
FOR COUNTRYCODE=123
ABC count= 1
XYZ count= 1
Which means, I want to count for each transaction, the latest entry based on date. And there can be many contries like this. And I need to count both entries for ABC & XYZ.
Normal count will give me duplicate entries.
Any help is highly appreciated!!
Thanks,
Mandar