CS Electrical And Electronics
@cselectricalandelectronics

Which of the following command is correct when you want to fetch documents from a collection for only those employees whose salary is either 8500 or 10000

All QuestionsCategory: Data ScienceWhich of the following command is correct when you want to fetch documents from a collection for only those employees whose salary is either 8500 or 10000
Anonymous asked 3 years ago

Options:

  1. db.employees.find.sort({\”salary\”{$in:[8500,10000]}})
  2. db.employees.find({\”salary\”{$in:[8500,10000]}})
  3. db.employees.find.sort({\”salary\”{$in:[8500,10000}}})
  4. db.employess.find.sort({\”salary\”{\”$in:[8500,10000]\”}})