{"id":19925316,"url":"https://github.com/vidhya0501/day36task36_be_mongodb_task_2_vidhya","last_synced_at":"2026-06-15T09:31:31.106Z","repository":{"id":226547668,"uuid":"768999266","full_name":"Vidhya0501/Day36Task36_BE_MongoDB_Task_2_Vidhya","owner":"Vidhya0501","description":"MongoDB queries to create zen class db and display  details based on the requirement.","archived":false,"fork":false,"pushed_at":"2024-03-08T06:18:31.000Z","size":2283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T10:30:44.444Z","etag":null,"topics":["backend","mongo-compass","mongodb","mongosh"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vidhya0501.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-08T06:11:13.000Z","updated_at":"2024-03-08T06:13:13.000Z","dependencies_parsed_at":"2024-03-08T07:26:04.308Z","dependency_job_id":"1fcad581-e898-4b79-9120-b31560552917","html_url":"https://github.com/Vidhya0501/Day36Task36_BE_MongoDB_Task_2_Vidhya","commit_stats":null,"previous_names":["vidhya0501/day36task36_be_mongodb_task_2_vidhya"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vidhya0501/Day36Task36_BE_MongoDB_Task_2_Vidhya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vidhya0501%2FDay36Task36_BE_MongoDB_Task_2_Vidhya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vidhya0501%2FDay36Task36_BE_MongoDB_Task_2_Vidhya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vidhya0501%2FDay36Task36_BE_MongoDB_Task_2_Vidhya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vidhya0501%2FDay36Task36_BE_MongoDB_Task_2_Vidhya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vidhya0501","download_url":"https://codeload.github.com/Vidhya0501/Day36Task36_BE_MongoDB_Task_2_Vidhya/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vidhya0501%2FDay36Task36_BE_MongoDB_Task_2_Vidhya/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","mongo-compass","mongodb","mongosh"],"created_at":"2024-11-12T22:21:51.294Z","updated_at":"2026-06-15T09:31:31.069Z","avatar_url":"https://github.com/Vidhya0501.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Zen Class DB using MongoDB\n\n1.\tFind all the topics and tasks which are thought in the month of October\n\n\n\ndb.createView( \"octoberSession\", \"topics\", [\n  {\n     $lookup:\n        {\n           from: \"tasks\",\n           localField: \"topic_id\",\n           foreignField: \"topic_id\",\n           as: \"tasksDocs\"\n        }\n  },\n  {\n     $project:\n        {\n          _id: 0,\ntopic_id:1,\ntask_id:\"$tasksDocs.task_id\",\nDate:1,\ntopic_name:1,\ntask_name:\"$tasksDocs.task_name\"\n  }\n  },\n{ $unwind: \"$task_id\" },\n    { $unwind: \"$task_name\" }\n] )\n\n\ndb.octoberSession.aggregate([{$match:{$expr:{$eq:[{$month:{$dateFromString:{dateString:\"$Date\", format:\"%Y-%m-%d\"}}},10]}}}])\n\n2.\tFind all the company drives which appeared between 15 oct-2020 and 31-oct-2020\n\ndb.company_drives.find({Date:{$gte:\"2020-10-15\",$lte:\"2020-10-31\"}})\n\n3.\tFind all the company drives and students who are appeared for the placement.\n\ndb.createView( \"placement1\", \"company_drives\", [\n  {\n     $lookup:\n        {\n           from: \"users\",\n           localField: \"User_id\",\n           foreignField: \"User_id\",\n           as: \"userDocs\"\n        }\n  },\n  {\n     $project:\n        {\n          _id: 0,\n          User_id: 1,\n          User_name:\"$userDocs.Name\",\n          drive_id: 1,\n          Date: 1,\n          drive_name:1,\n          \n        }\n  },\n     { $unwind:\"$User_name\" }\n] )\n\ndb.placement1.find()\n\n \n4.\tFind the number of problems solved by the user in codekata\n\ndb.codekata.aggregate( [\n  {\n     $group:\n        {\n           _id: \"$User_id\",\n           totalProblemsSolved: { $sum:  {$toInt:\"$Problems_solved\" }} \n        }\n  }\n] )\n\n5. Find all the mentors with who has the mentee's count more than 15\n\ndb.mentors.find({ mentee_count: { $gt: 15 } }).pretty()\n\n6. Find the number of users who are absent and task is not submitted  between 15 oct-2020 and 31-oct-2020\n\ndb.attendance.aggregate([\n{\n\t$match:{\n\t\tDate:{\n\t\t\t$gte:\"2020-10-15\", $lte:\"2020-10-31\"\n},\n\t\tStatus:\"Absent\"\n\t\t}\n},\n{\n\t$lookup:{\n\t\tfrom :\"tasks\",\n\t\tlocalField:\"User_id\",\n\t\tforeignField:\"User_id\",\n\t\tas:\"tasksDocs\"\n\t\t}\n},\n{\n\t$match:{\n\t\t\"tasksDocs.submitted\":\"false\"\n\t\t}\n},\n{\n\t$group:{\n\t\t_id:null,\n\t\tcount:{$sum:1}\n\t\t}\n}\n])\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidhya0501%2Fday36task36_be_mongodb_task_2_vidhya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvidhya0501%2Fday36task36_be_mongodb_task_2_vidhya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvidhya0501%2Fday36task36_be_mongodb_task_2_vidhya/lists"}