So like this?:
SELECT item_id
FROM item_changes
WHERE customer = 'ABC'
AND item_timestamp >= '2006-01-08'
AND item_timestamp < '2006-01-14'
AND item_attribute ='attribute1'
ORDER BY item_attribute
LIMIT 10
UNION
SELECT item_id
FROM item_changes
WHERE customer = 'ABC'
AND item_timestamp >=...
Can I do a query using join for two tables in mySQL?
SELECT COUNT (*) AS itema_count, itema_operation, old_itema_code, new_itema_code
FROM itema_changes
WHERE edit_operation IN ('-', '+', '>')
AND customer_id= '123'
AND timestamp > '2006-01-15' AND pickup_timestamp < '2006-01-21'
ORDER BY...
Thank you Juice05 and especially you blueCGH for spelling it out. I should have mentioned what database I'm using - it is mySQL. Does the TOP command work with that database type? If this is the wrong forum please point me to the correct one b/c I plan on having more questions! :)
--Laureen = )
I'm trying to adjust a query but I am very new to using SQL and just found this forum. I would appreciate any help. This will make me much more efficient at my job.
Here is a mock up:
SELECT item_id
FROM item_changes
WHERE customer = 'ABC'
AND item_timestamp >= '2006-01-08'
AND...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.