I am finding it hard to build a SQL, on the following database schema,
Shop
id
name
Order
id
shop_id
date
amount
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),
WHERE order.date = '2011-7-13'
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.
Could somebody please give some hints on this?
Many thanks to you all.