1

I am working one use case poc, where I want to query multiple documents present in the same collection in MongoDB based on some condition? an example would be enough.

Looking for a query similar like SQL select query on two tables(following query) is it possible in MongoDB?
select t1.X, t1.Y_DT,t1.Z,t1.adj,t1.bjc,t1.jbc,t1.mnk,t2.adj1,t2.bjc1,t2.jbc1,t2.mnk1 from test250 t1, test350 t2 where t1.X = t2.X AND t1.Y_DT=t2.Y_DT AND t1.Z = t2.Z;

if possible, any example query greatly helps me out.

user2927486
  • 111
  • 2
  • 8
  • 1
    Does this answer your question? [Mongodb aggregation lookup with conditions](https://stackoverflow.com/questions/48518215/mongodb-aggregation-lookup-with-conditions) You need to use `$lookup` aggregation operator as given in the link ! – whoami - fakeFaceTrueSoul May 07 '20 at 17:07

0 Answers0