I seem to be having some problems with something simple here.
I have some data with timestamps. I have a pair of dates and I want to get the data between those dates, IE:
I've tried:
SELECT 
    SUM(total_amount) as total_sales_amount 
FROM 
    purchases 
WHERE 
    timestamp <= "2011-11-13"   
AND 
    timestamp >= "2011-11-06"
and:
SELECT 
    SUM(total_amount) as total_sales_amount 
FROM 
    purchases 
WHERE 
    date(timestamp) <= "date(2011-11-13)" 
AND 
    date(timestamp) >= "date(2011-11-06)"
This doesn't work.
It doesn't throw an error, it just doesn't return the results between those dates.
What am I misunderstanding?
 
    