0
Two tables tab_Ord_Ser
and tab_Pos_Alb
.
In two different queries I can know the values but I’m not able to unite them in just one.
Are they:
SELECT
Prazo_Producao as Data,
COUNT( `Numero OS` ) AS Produzir,
Tipo_Album
FROM
tab_Ord_Ser
WHERE
Prazo_Producao >= "2018-03-01"
GROUP BY
Prazo_Producao,
Tipo_Album
and
SELECT
tab_Pos_Alb.`Data`,
COUNT( tab_Pos_Alb.`Numero OS` ) AS Produzido,
tab_Ord_Ser.Tipo_Album
FROM
tab_Ord_Ser
INNER JOIN tab_Pos_Alb ON tab_Ord_Ser.`Numero OS` = tab_Pos_Alb.`Numero OS`
WHERE
( tab_Pos_Alb.STATUS = "15 - Limpeza Saída" OR tab_Pos_Alb.STATUS = "46 - Finalizado" )
AND tab_Pos_Alb.`Data` >= "2018-03-01"
GROUP BY
tab_Pos_Alb.`Data`,
tab_Ord_Ser.Tipo_Album
Someone can help me?
what you have tried?
– Costamilam
I have tried to use sub-consultations but it goes a little beyond my knowledge, despite having researched you enough I could not build the query
– Márcio José Rosa