Hallo zusammen,
ich würde gerne eine Verkaufsauswertung je Plattform in die Eigene Übersicht im Artikel Bereich hinzufügen. Mit dem Code unten bekomme ich schon eine Auswertung für alle Plattformen, allerdings haben wir 2 POS Standorte und diese hätte ich gerne separat angezeigt. Kann mir das jemand umschreiben?
select
tPlattform.cName,
FORMAT( tBestellung.dErstellt, 'yyyy', 'de-de' ) AS 'Jahr',
FORMAT(sum(tbestellpos.nAnzahl), '#') AS 'Menge',
FORMAT(avg(tbestellpos.fVKNetto), '0.000') AS 'VK Schnitt'
from tbestellpos
join tBestellung on tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
join tPlattform on tBestellung.nPlatform = tPlattform.nPlattform
where (tbestellpos.tArtikel_kArtikel = @key) AND (NOT (tbestellpos.fVKNetto = 0))
group by tPlattform.cName, FORMAT( tBestellung.dErstellt, 'yyyy', 'de-de' )
Danke!!
ich würde gerne eine Verkaufsauswertung je Plattform in die Eigene Übersicht im Artikel Bereich hinzufügen. Mit dem Code unten bekomme ich schon eine Auswertung für alle Plattformen, allerdings haben wir 2 POS Standorte und diese hätte ich gerne separat angezeigt. Kann mir das jemand umschreiben?
select
tPlattform.cName,
FORMAT( tBestellung.dErstellt, 'yyyy', 'de-de' ) AS 'Jahr',
FORMAT(sum(tbestellpos.nAnzahl), '#') AS 'Menge',
FORMAT(avg(tbestellpos.fVKNetto), '0.000') AS 'VK Schnitt'
from tbestellpos
join tBestellung on tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
join tPlattform on tBestellung.nPlatform = tPlattform.nPlattform
where (tbestellpos.tArtikel_kArtikel = @key) AND (NOT (tbestellpos.fVKNetto = 0))
group by tPlattform.cName, FORMAT( tBestellung.dErstellt, 'yyyy', 'de-de' )
Danke!!