4 ms·
Lesson 6 asks for 'Here's a tricky one: get ONLY the NAMES of the 2nd and 3rd heaviest male unicorns' Which made me query: db.unicorns.find({gender:'m'}, {name
by steilpass 16y ago
Lesson 6 asks for 'Here's a tricky one: get ONLY the NAMES of the 2nd and 3rd heaviest male unicorns'
Which made me query:
db.unicorns.find({gender:'m'}, {name:1, _id:0}).sort({weight:-1}).skip(1).limit(2)
but it wants:
db.unicorns.find({gender:'m'}, {name:1}).sort({weight:-1}).skip(1).limit(2)
- latch 16y agoHey, thanks! I didn't know you could exclude the _id like that...I can actually make us of that trick. Going to push out a new version with that, and a few other fixes, in a few.
- lowglow 16y agoLesson 7 quit on me. How do I skip lessons? Ze mouze clickz, zey do nottingz.
- latch 16y agolesson(8);