jat Posted September 10, 2020 Share Posted September 10, 2020 Hola a tod@s Puede que os pidan verificar si los código ean13 están duplicados, es importante sobre todo en el mundo marketplace para evitar errores y ventas de un producto con el precio inferior de otro producto. Os comparto como obtener esa información en la base de datos: tabla: ps_product SELECT p.id_product, p.reference, p.id_supplier, id_manufacturer ,p.ean13 FROM ps_product p WHERE p.ean13 IN (SELECT ean13 FROM ps_product GROUP BY ean13 HAVING COUNT(*)>1) ORDER By p.ean13 ASC; tabla: ps_product_attribute SELECT pa.id_product_attribute, pa.id_product, pa.reference, pa.ean13 FROM ps_product_attribute pa WHERE pa.ean13 IN (SELECT ean13 FROM ps_product_attribute GROUP BY ean13 HAVING COUNT(*)>1) ORDER By pa.ean13 ASC; Espero que os pueda servir, ademas si tenéis otra forma de hacerlo, podéis compartirlo! Un cordial saludo a tod@s! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now