I have this code, works well.
I want it to only show records where TTL is greater than 0.
If I add "AND TTL > 0 " in the WHERE clause, it errors. Help please.
SELECT p.ID, p.ProductName, p.Image, COUNT(*) as `TTL`
FROM `products` p
JOIN `inventory` i ON p.ID = i.ProductID
WHERE i.DateAdded > 0 AND p.ProductStatus = 0 AND p.ID != 60
GROUP By p.ID