开发者

Query in mongodb within two joined collections

开发者 https://www.devze.com 2022-12-07 21:17 出处:网络
If I have a collection of employees and a collection of their salaries. How can i find the employee with highest salary and lowest?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消