title: Building a SQL to calculate the number of rows relating to the parent
body: <p>I am finding it hard to build a SQL, on the following database schema,</p>
  <h3>Shop</h3>
  <p>id<br/>
  name</p>
  <h3>Order</h3>
  <p>id<br/>
  shop_id<br/>
  date<br/>
  amount</p>
  <p>You can see that a shop can have many orders.
  I would like to a build a SQL that gives the number of orders of each shop on a specific date.
  So the WHERE part must be (e.g. 2011-7-13),</p>
  <p>WHERE order.date = '2011-7-13'</p>
  <p>I can't think of how the SELECT part should be like. I think COUNT(*) should be used but this is all what I have got in my brain now.</p>
  <p>Could somebody please give some hints on this?</p>
  <p>Many thanks to you all.</p>