I have two collections in mongodb.
requests collection
- _id
- ipaddress
- createdon
geoip collection
- _id
- ipaddress
- country
- city
geoip is a look up table for IP address, which is unique here.
I need the following result, to find the total number of requests from each country. In other words, the following 2 columns.
country and recordcount (from requests collection based on the ipaddress)
Since this requires grouping 2 separate collections and combining them to get the results, I am at a loss here.