Hello, I have a question if anyone can help me about SQL. I know the Group By clause, as far as I know how to group similar data. But I understand that it should group but in the script below it has the group by show lines and without the group by it shows only one lines. It was not just for grouping, I thought it would suit something more aesthetic !!!
With Group By
select p.descricao
from projeto p
join depto d on p.cod_depto = d.cod_depto
join empregado e on e.cod_depto = d.cod_depto
group by p.descricao
having count(e.mat)>1;
NoGroupBy
selectp.descricaofromprojetopjoindeptodonp.cod_depto=d.cod_deptojoinempregadoeone.cod_depto=d.cod_deptohavingcount(e.mat)>1;