I used to have two tables in SQL Server:
Branch(branchNo, city)
Staff(branchNo, staffNo, staffName)
On the SQL Server, I could find all staff in a specific city using:
select staffName from Branch, Staff where
Branch.branchNo == Staff.branchNo AND city = 'a specific city'
Now in mongoDB, I put both tables' content into one collection, how can I use MapReduce to get the same effect of the sql query?