Last active
August 16, 2018 09:16
-
-
Save elcolumbio/c1515e9ac75bc19b97c05320190c56ad to your computer and use it in GitHub Desktop.
jtl statistic view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****** | |
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