Show products that have not been sold in 2018

-1

To show those that do not exist use this:
R = product.name From: product, order Where: product.cod_prod - order.cod_prod

    
asked by atencio947 28.10.2018 в 21:55
source

1 answer

0

I believe that this query solves what you need:

SELECT PR.nombre
FROM Producto AS PR
WHERE NOT EXISTS(
    SELECT 1
    FROM PEDIDO AS PE
    WHERE PE.cod_prod = PR.cod_prod
      AND YEAR(PE.fecha_ped) = 2018)

I hope it serves you.

Good luck!

    
answered by 28.10.2018 в 22:03