Skip to content

Instantly share code, notes, and snippets.

@elcolumbio
Last active August 16, 2018 09:16
Show Gist options
  • Save elcolumbio/c1515e9ac75bc19b97c05320190c56ad to your computer and use it in GitHub Desktop.
Save elcolumbio/c1515e9ac75bc19b97c05320190c56ad to your computer and use it in GitHub Desktop.
jtl statistic view
/******
Skript für Select neueste Bestellungen
Die Keys sind genauso für viele andere Tabellen verwendbar.
******/
SELECT TOP (1000) B.kBestellung
,V.cName as 'Versandart'
,W.fWert/W.fFaktor as 'Betrag Bestellung in Euro' /* veraltete Wechselkurse */
,P.cName as 'Plattform'
,B.nStorno
,B.dBezahlt
,B.cVersandlandISO
,B.nPremium
FROM [eazybusiness].[dbo].[tBestellung] as B
LEFT JOIN [eazybusiness].[dbo].tBestellungEckDaten as W on B.kBestellung=W.kBestellung /* W für Wert der Bestellung */
LEFT JOIN [eazybusiness].[dbo].[tPlattform] as P on B.nPlatform=P.nPlattform /* P für Verkaufs-Plattform */
LEFT JOIN [eazybusiness].[dbo].[tversandart] as V on B.tVersandArt_kVersandArt=V.kVersandArt /* V für Versand */
WHERE W.fWert/W.fFaktor > 0
ORDER BY [dBezahlt] DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment