0
Hello! I need to make an SQL that gives me the result and I wish in the same line. Today SQL is skipping a line. I need you to stay on the same line.
select c.empresa, p.nome, (select count(sequencialOC) where OrdemAut = 'N') as 'Com cotação', (select count(sequencialOC) where OrdemAut = 'S') as 'Sem cotação' from compras c inner join pessoas p on (c.empresa = p.codigo) where c.data between '01/01/2020' and '29/09/2020' group by c.OrdemAut,c.Empresa, c.nome
Try to explain what result you want to achieve and also with these subselects which I consider to be meaningless.
– anonimo
The idea is to know which are the PURCHASE ORDER of a company that has a quotation and which purchase order does not have a quotation. I only wish to total the amount of each situation, filtering by company and by date.
– Julio Cesar Andrade