1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| SELECT a.ct_num, b.ct_intitule, SUM(a.DL_MontantHT) as CA
FROM F_DOCLIGNE AS a
RIGHT JOIN F_COMPTET AS b
ON a.ct_num = b.ct_num
where a.dl_datebl between '01/08/2008' and '30/04/2009'
and a.ct_num like 'c%' and a.do_piece like 'fa%'
group by a.CT_Num, b.ct_intitule
SELECT c.ct_num, d.ct_intitule, SUM(c.DL_MontantHT) as BA
FROM F_DOCLIGNE AS c
RIGHT JOIN F_COMPTET AS d
on c.ct_num = d.ct_num
where c.dl_datebl between '01/08/2007' and '30/04/2008'
and c.ct_num like 'c%' and c.do_piece like 'fa%'
group by c.CT_Num,d.ct_intitule |
Partager