Uit de cursus: Learning MongoDB

Krijg vandaag toegang tot de volledige cursus

Word vandaag lid en krijg toegang tot meer dan 23.400 cursussen geleid door branchedeskundigen.

Challenge: Write a query

Challenge: Write a query

(upbeat music) (music ends) - [Instructor] Well, it's that time again, another challenger appears. Okay, so in all seriousness, let's get your fingers to typing and use some of the concepts and skills we've learned so far. Your mission, using the provided recipes collection, or if you want to use your own data, feel free to adopt this, if that's your thing, you have three tasks. First, we need a query that will bring back the top rated recipes, five being the highest rating. Base that off the ratings of Ray, but hint, explore the scheme of the documents and you'll probably see a ratings average field with the average already compiled for you. Use this to order results by the most popular, limited to four. You can pause the video now and try. For challenge number two, once you have done that, write a query that uses the tags array field in our recipes to bring back the recipes tagged with Mexican, still ordered by top…

Inhoud