<slide>
<title>MongoDB: Query</title>

<div effect="fade-out">
<example inline="2">
db.checkins.find( {
	region_slug: 'scotland-islay',
	rating: { $gte: 3 }
}, {
	whisky: 1, rating: 1, age: 1
} ).pretty();
</example>
</div>

<div effect="fade-in-out">
<example inline="2">
db.checkins.find( {
	*region_slug: 'scotland-islay',*
	rating: { $gte: 3 }
}, {
	whisky: 1, rating: 1, age: 1
} ).pretty();
</example>

<list>
	<bullet>Equality Match</bullet>
</list>
</div>

<div effect="fade-in-out">
<example inline="2">
db.checkins.find( {
	region_slug: 'scotland-islay',
	*rating: { $gte: 3 }*
}, {
	whisky: 1, rating: 1, age: 1
} ).pretty();
</example>

<list>
	<bullet>Equality Match</bullet>
	<bullet>Match with a Query Operator</bullet>
</list>
</div>

<div effect="fade-in">
<example inline="2">
db.checkins.find( {
	region_slug: 'scotland-islay',
	rating: { $gte: 3 }
}, {
	*whisky: 1, rating: 1, age: 1*
} ).pretty();
</example>

<list>
	<bullet>Equality Match</bullet>
	<bullet>Match with a Query Operator</bullet>
	<bullet>Projection</bullet>
</list>
</div>

<div effect="fade-in">
<break lines="1"/>
<blurb>As SQL:</blurb>
<example class="big">
SELECT whisky, rating, age
FROM   checkins
WHERE  region_slug = "scotland-islay" AND
       rating >= 3;
</example>
</div>

</slide>
