0
I have the following table :
Product status
SELECT id_produto_status_history, status, description, create_date, id_produto
FROM produto_status_history;
where I store product history status There is a processing that alters this status and always inserts a row in this table with different status, HOWEVER THE ITEMS THAT WERE NOT processed are only one row in this table with CART status. I wanted to do a select just to catch these guys. Pick up all products that have only the status line as CART, if you have another line do not have to come in select. IE according to the table below the select should return only ID 58 E 59
then the table looks like this :
id_produto_status_history, status, create_date, id_produto
162 CARRINHO 2021-08-06 18:27:24 56
164 PAGO 2021-08-06 18:39:43 56
166 ESTOQUE 2021-08-06 18:39:44 56
168 ENVIADO 2021-08-06 18:39:54 56
162 CARRINHO 2021-08-06 18:27:24 57
164 PAGO 2021-08-06 18:39:43 57
166 ESTOQUE 2021-08-06 18:39:44 57
168 ENVIADO 2021-08-06 18:39:54 57
162 CARRINHO 2021-08-06 18:27:24 58
162 CARRINHO 2021-08-06 18:27:24 59
this sql command compiles?
– Danizavtz