I need to execute such sql query on mongo(I mean mongodb query should be logically equal to the sql). So here is the SQL query:
SELECT * FROM table1 ALIAS1
WHERE
field1=1
AND
field2=2
AND (
EXISTS(
SELECT * FROM table2
where table2.field33 = ALIAS1.field1
)
)
Is it possible to do such a query in mongodb in one query?