ARKADAŞLAR AŞAĞIDAKİ GİBİ BİR SORGU VAR BEN BU SORGUDAKİ SATIRLARI TEKE DÜŞÜRMEK İSTİYOEUM YARDIM EDERMİSİNİZ.
SELECT DISTINCT EMH.CODE AS KODU,
(CASE EMT.MONTH_ WHEN 1 THEN EMT.DEBIT END) AS OCAK,
(CASE EMT.MONTH_ WHEN 2 THEN EMT.DEBIT END) AS ŞUBAT,
(CASE EMT.MONTH_ WHEN 3 THEN EMT.DEBIT END) AS MART,
(CASE EMT.MONTH_ WHEN 4 THEN EMT.DEBIT END) AS NİSAN,
(CASE EMT.MONTH_ WHEN 5 THEN EMT.DEBIT END) AS MAYIS,
(CASE EMT.MONTH_ WHEN 6 THEN EMT.DEBIT END) AS HAZİRAN,
(CASE EMT.MONTH_ WHEN 7 THEN EMT.DEBIT END) AS TEMMUZ,
(CASE EMT.MONTH_ WHEN 8 THEN EMT.DEBIT END) AS AĞUSTOS,
(CASE EMT.MONTH_ WHEN 9 THEN EMT.DEBIT END) AS EYLÜL,
(CASE EMT.MONTH_ WHEN 10 THEN EMT.DEBIT END) AS EKİM,
(CASE EMT.MONTH_ WHEN 11 THEN EMT.DEBIT END) AS KASIM,
(CASE EMT.MONTH_ WHEN 12 THEN EMT.DEBIT END) AS ARALIK
FROM LG_212_EMUHACC AS EMH LEFT OUTER JOIN
LG_212_01_EMUHTOT AS EMT ON EMH.LOGICALREF = EMT.ACCOUNTREF
WHERE (EMT.TOTTYPE = 1) AND CODE LIKE '7%'
GROUP BY EMH.CODE,EMT.MONTH_,EMT.DEBIT