Skip to content

Instantly share code, notes, and snippets.

@jeffyuhaoliu
Created October 17, 2013 23:43
Show Gist options
  • Save jeffyuhaoliu/7034264 to your computer and use it in GitHub Desktop.
Save jeffyuhaoliu/7034264 to your computer and use it in GitHub Desktop.
MongoDB & Node.js Finals 1 - Construct a query to calculate the number of messages sent by Andrew Fastow, CFO, to Jeff Skilling, the president. Andrew Fastow's email addess was andrew.fastow@enron.com. Jeff Skilling's email was jeff.skilling@enron.com.
use enron
db.messages.find({$and: [{"headers.From": "andrew.fastow@enron.com"}, {"headers.To": "jeff.skilling@enron.com"}]}).count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment