1
friends have an appointment like this:
SELECT v.product_id,nome AS Produto,presentation AS Descricao,
presentation AS Descricao2, name1 AS categoria,
description_two AS descricao, price AS preco,
quantity AS estoque, width, height, depth, weight,
NAME, referenceCode, datapostagem
FROM Variant v
INNER JOIN ProductCategory p ON v.product_id = p.product_id
INNER JOIN Product ON Product.id = p.product_id
INNER JOIN Category ON Category.id = category_id
INNER JOIN Image i ON i.product_id = p.product_id
INNER JOIN DescriptionGroup D ON D.product_id = p.product_id
INNER JOIN Stock S ON S.variant_id = v.id
INNER JOIN DimensionGroup G ON G.variant_id = v.id
LIMIT 10
and in this query return me many duplicated product_id as I can create a SUM or to separate duplicates in another table ?
What is the database manager? mariaDB, Oracle Database, Postgresql etc?
– José Diz
mysql, phpmyadmin
– J Junior Carneiro
It is not that it is bringing duplicate, but because it can contain + of 1 record in a table referenced by
JOIN
, in relation to the main tableVariant
.– rbz