Query in mongodb within two joined collections
If I have a collection of employees and a collection of their salaries. How can i find the employee with highest salary and lowest?
Employee:{
{id:123,
name:abc},
{id:456,
name:efg}
}
Salary:{
{id:123,
amou开发者_C百科nt:100},
{id:456,
amount:200}
}
Currently I am using node js and mongooses in my project.
精彩评论