title: How to translate from SQL to NoSQL/MapReduce?
body: <p>I have a background working with relational databases but recently started to dabble in CouchDB and was surprised by how some non-relational operations, which would be simple in SQL, were not first-class functions in CouchDB.</p>
  
  <p>I would appreciate you taking a moment to map each SQL statement below to its MapReduce equivalent.</p>
  
  <pre><code>SELECT COUNT(*) FROM products WHERE price &lt; 20.00;
  SELECT category, SUM(price) FROM products GROUP BY category;
  UPDATE products SET price = 19.99 WHERE price = 20.00;
  DELETE FROM products WHERE expires_at &lt;= NOW();
  </code></pre>