-2
I have an SQL that when run gives error. Someone could help me to perform the grouping of this SQL?
select i.ref, r.nome,n.qtde,sum(n.vlr_tot)
from geitens as i
inner join gerefer as r on r.cod = i.ref
inner join gelannfs as n on n.item = i.cod
inner join gecadnfs as c on c.doc = n.doc
where c.serie = 'Z' and n.mes = :mes and n.ano = :ano
and c.mes = :mes and c.ano = :ano group by i.ref order by i.ref
Tried to make
GROUP BY i.ref, r.nome,n.qtde
?– anonimo