i have a work collection, with fields work_id, work_ref, sequence, etc. I need a query for mongodb for its sql server equivalent : select work_id, work_ref from work w1 where w1.sequence = (select max(sequence) from work w2 where w2.work_order_ref = w1.work_order_ref)
2.1m questions
2.1m answers
60 comments
57.0k users