This project injects fake library DB and lets you practice querying with MongoDB.
git clone
this repo- Use
cd
to the repo folder and runnpm install
- Run
npm run populate
to insert the fake data to your MongoDB. - Open Compass and see the new data!
Filter the data according to the following criterias. Use the official documentation: https://docs.mongodb.com/manual/reference/operator/query/
- Users with the first name "noah" (3 documents)
- Users with the title "miss" and first name "melissa" (2 documents)
- Posts with the tag "culpa" (44 documents)
- Posts with more than 900 likes (48 documents)
- Posts with less than 10 likes with the tag "quis" (1 document)
- Posts that were created on this date: "2015-10-05 13:34:49.000" (1 document)
- Posts that were created after this date: "2017-02-07 06:32:12.000" (222 documents)
- Posts that were created after July 1st, 2018 (138 documents)
- How many posts got between 100 to 200 likes? (49 documents)
- How many comments got the post with the greatest amount of likes?