I use the below query, but it shows some repeated items. So I use the group
function, but it does not work.
SELECT p.productId, p.productName, p.catId, p.subCatId, p.productType,
p.modelNo, p.picUrl, p.color, p.theme, p.productPrice, p.discountedPrice,
p.quantity, p.details, p.mainPageDisplay, p.productPageDisplay,
s.subCatId AS Expr1,
s.subCatName, s.catId AS Expr2,
s.rank, s.subCatName AS Expr3
FROM (products p INNER JOIN
subCategories s ON p.catId = s.catId)
WHERE (p.color = 'red') group By p.productName
This query is working fine, but when I add group by
then it's not working.