Einzelnen Beitrag anzeigen

mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.861 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: SQL-Abfrage nach Monat gruppieren

  Alt 18. Apr 2007, 17:14
SQL-Code:
SELECT EXTRACT ( MONTH FROM PUB_S_D.D_DATE ) S_MONTH,
       EXTRACT ( YEAR FROM PUB_S_D.D_DATE ) S_YEAR,
       PUB_S_DD.BIBLE_TYPE,
       SUM (PUB_S_DD.AMOUNT) AS TOT_AMOUNT
FROM
       PUB_S_D
           INNER JOIN PUB_S_DD ON (PUB_S_D.ID = PUB_S_DD.ID_D)
GROUP BY
        S_MONTH, S_YEAR, PUB_S_DD.BIBLE_TYPE
Markus Kinzler
  Mit Zitat antworten Zitat