Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
select
    ABFDocErfNr                       as "Rechnungs-Nr.",
    ABFDocDatum                       as "Datum",
    round(ABFDocSumme,2)              as "Gesamt",
    ABFDocKundenNr                    as "Kunden-Nr.",
    ABFDocKundeKurzbez                as "Kunde",
    ABFPosArtNr                       as "Art. Nr.",
    round(ABFPosMenge,2)              as "Anz.",
    round(ABFPosEPreis,2)             as "Preis",
    round(ABFPosMenge*ABFPosEPreis,2) as "Summe",
    ABFPosName1                       as "Name",
    ABFPosName2                       as "Zusatz"
from
    ABFDok, ABFPos
where
    ABFPos.ABFPosDocId = ABFDok.ABFDocId
order by ABFDocDatum desc

Umsätze pro Monat

No Format

select 
    date_format(ABFDocDatum, "%Y-%m") as "Monat",
    sum(ABFDocSumme) as "Summme"
from
    ABFDok
group by
    date_format(ABFDocDatum, "%Y-%m")