Hello, I'm trying to get 2009 sales totals on particular products, but I'm having trouble with this query. Both work as separate entities:
SELECT product_code, price FROM `order_details`
WHERE
product_code = 'CS007BLK'
AND
order_id = (
SELECT order_id FROM `orders`
WHERE
timestamp BETWEEN UNIX_TIMESTAMP('2009-01-01 01:00:02')
AND
UNIX_TIMESTAMP('2009-12-31 23:59:03' LIMIT 1)
)
I get :
Subquery returns more than 1 row
Please help this beginner.