{"id":39822977,"url":"https://github.com/muhammadfarooq85/mongodb-aggregation-framework-part-1","last_synced_at":"2026-01-18T13:01:12.323Z","repository":{"id":282566188,"uuid":"870446007","full_name":"muhammadfarooq85/MongoDb-Aggregation-Framework-Part-1","owner":"muhammadfarooq85","description":"This repository is about aggregation framework in MongoDb. What is aggregation pipelines? Happy Coding!","archived":false,"fork":false,"pushed_at":"2024-10-15T07:41:42.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T13:37:15.214Z","etag":null,"topics":["database","mongodb","sql"],"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/muhammadfarooq85.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,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T03:59:00.000Z","updated_at":"2024-11-08T10:04:29.000Z","dependencies_parsed_at":"2025-03-15T13:47:22.197Z","dependency_job_id":null,"html_url":"https://github.com/muhammadfarooq85/MongoDb-Aggregation-Framework-Part-1","commit_stats":null,"previous_names":["muhammadfarooq85/mongodb-aggregation-framework-part-1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muhammadfarooq85/MongoDb-Aggregation-Framework-Part-1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadfarooq85%2FMongoDb-Aggregation-Framework-Part-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadfarooq85%2FMongoDb-Aggregation-Framework-Part-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadfarooq85%2FMongoDb-Aggregation-Framework-Part-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadfarooq85%2FMongoDb-Aggregation-Framework-Part-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammadfarooq85","download_url":"https://codeload.github.com/muhammadfarooq85/MongoDb-Aggregation-Framework-Part-1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadfarooq85%2FMongoDb-Aggregation-Framework-Part-1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["database","mongodb","sql"],"created_at":"2026-01-18T13:00:52.705Z","updated_at":"2026-01-18T13:01:12.274Z","avatar_url":"https://github.com/muhammadfarooq85.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MongoDb-Aggregation-Framework\n\n## This repository is about aggregation framework in MongoDb. What is aggregation pipelines? Happy Coding!\n\n## Cursor Methods:-\n\n### Most important cursor methods are below.\n\n### 1) `sort`\n\n#### It is used to sort the data in ascending or descending order. For example:-\n\n```\ndb.mycollection.find().sort(username:1) // In Asc Order\ndb.mycollection.find().sort(username:-1) // In Desc Order\n```\n\n### 2) `limit`\n\n#### It is used to limit the number of data. For example:-\n\n```\ndb.mycollection.find().limit(1)\n```\n\n### 3) `skip`\n\n#### It is used to skip number of provided documents. For example:-\n\n```\ndb.mycollection.find().data(2)\n```\n\n### 4) `count`\n\n#### It is used to count documents. For example:-\n\n```\ndb.mycollection.find().count()\n```\n\n## Aggregation Framework\n\n### Aggregation in MongoDB is a way to process documents in a collection by passing them through a pipeline of stages. Each stage performs an operation on the documents, such as filtering, sorting, grouping, reshaping, or modifying them. The results from each stage are passed to the next stage.\n\n### `Situation #01:-`\n\n#### Give me those users who name id 'farooq'. For example:-\n\n```\n[\n  {\n    $match: {\n      name:'$farooq'\n    }\n  }\n]\n```\n\n### `Situation #02:-`\n\n#### Calculate all docs. For example:-\n\n```\n[\n  {\n    $count: 'All_Docs'\n\n  }\n]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadfarooq85%2Fmongodb-aggregation-framework-part-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammadfarooq85%2Fmongodb-aggregation-framework-part-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadfarooq85%2Fmongodb-aggregation-framework-part-1/lists"}