I have two queries as such:
db.employee.aggregate({$match: {lname:"Smith"}}, {$project: {"SSN": 1, "_id": 0}})
db.works_on.aggregate({$match: {essn: 123456789}}, {$project: {"pno": 1, "_id": 0}})
Is there a way that I can make this into a single query where the essn number is replaced with the SSN output by the first aggregate?