RE:Consulta 2 tablas
Publicado por Yoshi
(1 intervención) el 14/01/2009 18:06:33
select reare,sum(relc) as relc,sum(reli) as reli,sum(relc)+sum(reli) as totales,sum(lce) as lce, sum(lie) as lie,(sum(lce)+sum(lie)) as totalsuma
where reani='2008'and reare='01' and (remes>='01' and remes<='01') and (ibmes>='01' and ibmes<='01') and ibrom='M'
and ibani='2008' and ibare='01' and reani=ibani and reare=ibare
group by reare
order by reare