Neu Laufende eBay+ Amazonangbote in Eigene Übersichten

Frederik von Bot

Sehr aktives Mitglied
8. September 2012
173
50
Hallo,

wir würden gerne in den Eigenen Übersichten laufende Angebote und Verkaufzahlen einbinden um Mehrfachangebote zu vermeiden. Die Möglichkeit würde viele Klicks ersparen.

Mit Sql Abfragen habe ich schlechte Erfahrungen gemacht deswegen meide ich es wie der Teufel das Weihwasser selber zu experimentieren.

In der Wiki bin ich fündig geworden, da würde ich gerne noch den Namen der laufenden Auktion, Titel zur ID

Beispiel
Unbenannt.JPG

--Amazon Angebote
SELECT tPlattform.cName AS 'Plattform',
jAmazon.nQuantity AS 'Menge',
jAmazon.fPrice AS 'Akt. Preis',
ISNULL(jLetzte30Tage.absatz, 0) AS 'Absatz 30 Tage',
ISNULL(jLetzte90Tage.absatz, 0) AS 'Abs. 90 Tage',
ISNULL(jLetzte365Tage.absatz, 0) AS 'Abs. 365 Tage',
ISNULL(jAbsatzGesamt.absatz, 0) AS 'Abs. Gesamt',
ISNULL(jVKDurchschnitt.vk, 0) 'Ø VK-Brutto',
ISNULL(jAmazon.cASIN1, '') AS 'ID'
FROM tPlattform
JOIN ( --läuft er überhaupt auf amazon?
SELECT nPlattform,
nQuantity,
ROUND(CONVERT(FLOAT, fPrice), 2) AS fPrice,
pf_amazon_angebot.cASIN1
FROM pf_amazon_angebot
JOIN pf_amazon_angebot_mapping ON pf_amazon_angebot_mapping.cSellerSKU = pf_amazon_angebot.cSellerSKU
AND pf_amazon_angebot_mapping.kUser = pf_amazon_angebot.kUser
WHERE pf_amazon_angebot_mapping.kArtikel = @Key
) AS jAmazon ON jAmazon.nPlattform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -30, getdate())
GROUP BY nPlatform
) AS jLetzte30Tage ON jLetzte30Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -90, getdate())
GROUP BY nPlatform
) AS jLetzte90Tage ON jLetzte90Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -365, getdate())
GROUP BY nPlatform
) AS jLetzte365Tage ON jLetzte365Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jAbsatzGesamt ON jAbsatzGesamt.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(AVG(tbestellpos.fVKPreis), 0.0)), 2) AS vk
FROM tbestellpos
JOIN tBestellung ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jVKDurchschnitt ON jVKDurchschnitt.nPlatform = tPlattform.nPlattform
UNION --eBay Angebote - normale Artikel
SELECT tPlattform.cName AS 'Plattform',
ISNULL(jEbay.Quantity, 0) AS 'Menge',
ISNULL(jEbay.StartPrice, 0) AS 'Akt. Preis',
ISNULL(jLetzte30Tage.absatz, 0) AS 'Absatz 30 Tage',
ISNULL(jLetzte90Tage.absatz, 0) AS 'Abs. 90 Tage',
ISNULL(jLetzte365Tage.absatz, 0) AS 'Abs. 365 Tage',
ISNULL(jAbsatzGesamt.absatz, 0) AS 'Abs. Gesamt',
ISNULL(jVKDurchschnitt.vk, 0) 'Ø VK-Brutto',
ISNULL(jEbay.ItemID, '') AS 'ID'
FROM tPlattform
JOIN ( --läuft er überhaupt auf ebay?
SELECT ebay_xx_sites.kPlattform,
ebay_item.Quantity,
ROUND(CONVERT(FLOAT, ebay_item.StartPrice), 2) AS StartPrice,
ebay_item.ItemID
FROM ebay_item
JOIN ebay_xx_sites ON ebay_xx_sites.SiteID = ebay_item.SiteID
WHERE ebay_item.kArtikel = @Key
AND ebay_item.Status IN (3,7)
) AS jEbay ON jEbay.kPlattform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -30, getdate())
GROUP BY nPlatform
) AS jLetzte30Tage ON jLetzte30Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -90, getdate())
GROUP BY nPlatform
) AS jLetzte90Tage ON jLetzte90Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -365, getdate())
GROUP BY nPlatform
) AS jLetzte365Tage ON jLetzte365Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jAbsatzGesamt ON jAbsatzGesamt.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(AVG(tbestellpos.fVKPreis), 0.0)), 2) AS vk
FROM tbestellpos
JOIN tBestellung ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jVKDurchschnitt ON jVKDurchschnitt.nPlatform = tPlattform.nPlattform
UNION --eBay Angebote - als Kindartikel im eBay Variationsangebot
SELECT tPlattform.cName AS 'Plattform',
jEbay.fAnzahl AS 'Menge',
jEbay.fPreis AS 'Akt. Preis',
ISNULL(jLetzte30Tage.absatz, 0) AS 'Absatz 30 Tage',
ISNULL(jLetzte90Tage.absatz, 0) AS 'Abs. 90 Tage',
ISNULL(jLetzte365Tage.absatz, 0) AS 'Abs. 365 Tage',
ISNULL(jAbsatzGesamt.absatz, 0) AS 'Abs. Gesamt',
ISNULL(jVKDurchschnitt.vk, 0) 'Ø VK-Brutto',
CONCAT('Varkombi-Kind: ', jEbay.ItemID) AS 'ID'
FROM tPlattform
JOIN ( --läuft er überhaupt auf ebay als Kindartikel?
SELECT ebay_xx_sites.kPlattform,
CONVERT(INT, ebay_item2kombi.fAnzahl) AS fAnzahl,
ROUND(CONVERT(FLOAT, ebay_item2kombi.fPreis), 2) AS fPreis,
ebay_item.ItemID
FROM ebay_item
JOIN ebay_xx_sites ON ebay_xx_sites.SiteID = ebay_item.SiteID
JOIN ebay_item2kombi ON ebay_item2kombi.kItem = ebay_item.kItem
JOIN tartikel ON tartikel.kEigenschaftKombi = ebay_item2kombi.kEigenschaftKombi
WHERE tartikel.kArtikel = @Key
AND ebay_item.Status IN (3,7)
) AS jEbay ON jEbay.kPlattform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -30, getdate())
GROUP BY nPlatform
) AS jLetzte30Tage ON jLetzte30Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -90, getdate())
GROUP BY nPlatform
) AS jLetzte90Tage ON jLetzte90Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -365, getdate())
GROUP BY nPlatform
) AS jLetzte365Tage ON jLetzte365Tage.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jAbsatzGesamt ON jAbsatzGesamt.nPlatform = tPlattform.nPlattform
LEFT JOIN (
SELECT nPlatform, ROUND(CONVERT(FLOAT, ISNULL(AVG(tbestellpos.fVKPreis), 0.0)), 2) AS vk
FROM tbestellpos
JOIN tBestellung ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY nPlatform
) AS jVKDurchschnitt ON jVKDurchschnitt.nPlatform = tPlattform.nPlattform
UNION --eBay Angebote - als Kindartikel im eBay Variationsangebot
SELECT tShop.cName AS 'Plattform',
ISNULL(jShop.fVerfuegbar, 0) AS 'Menge',
dbo.ifGetPrice(jShop.kArtikel, 0, 1, jShop.kShop, 1) AS 'Akt. Preis',
ISNULL(jLetzte30Tage.absatz, 0) AS 'Absatz 30 Tage',
ISNULL(jLetzte90Tage.absatz, 0) AS 'Abs. 90 Tage',
ISNULL(jLetzte365Tage.absatz, 0) AS 'Abs. 365 Tage',
ISNULL(jAbsatzGesamt.absatz, 0) AS 'Abs. Gesamt',
ISNULL(jVKDurchschnitt.vk, 0) 'Ø VK-Brutto',
jShop.cArtNr AS 'ID'
FROM tShop
JOIN ( --läuft er in Shops oder POS, etc.?
SELECT tArtikelShop.kShop,
tArtikelShop.kArtikel,
ROUND(CONVERT(FLOAT, ISNULL(vLagerbestandEx.fVerfuegbar, 0)), 2) AS fVerfuegbar,
tartikel.cArtNr
FROM tartikel
JOIN tArtikelShop ON tArtikelShop.kArtikel = tartikel.kArtikel
LEFT JOIN vLagerbestandEx ON vLagerbestandEx.kArtikel = tartikel.kArtikel
WHERE tartikel.kArtikel = @Key
AND tArtikelShop.cDelInet != 'Y'
) AS jShop ON jShop.kShop = tShop.kShop
LEFT JOIN (
SELECT kShop, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -30, getdate())
GROUP BY kShop
) AS jLetzte30Tage ON jLetzte30Tage.kShop = tShop.kShop
LEFT JOIN (
SELECT kShop, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -90, getdate())
GROUP BY kShop
) AS jLetzte90Tage ON jLetzte90Tage.kShop = tShop.kShop
LEFT JOIN (
SELECT kShop, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
AND tBestellung.dErstellt > DATEADD(DAY, -365, getdate())
GROUP BY kShop
) AS jLetzte365Tage ON jLetzte365Tage.kShop = tShop.kShop
LEFT JOIN (
SELECT kShop, ROUND(CONVERT(FLOAT, ISNULL(SUM(tbestellpos.nAnzahl), 0.0)), 2) AS absatz
FROM tbestellung
JOIN tbestellpos ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY kShop
) AS jAbsatzGesamt ON jAbsatzGesamt.kShop = tShop.kShop
LEFT JOIN (
SELECT kShop, ROUND(CONVERT(FLOAT, ISNULL(AVG(tbestellpos.fVKPreis), 0.0)), 2) AS vk
FROM tbestellpos
JOIN tBestellung ON tbestellpos.tBestellung_kBestellung = tBestellung.kBestellung
WHERE tbestellpos.tArtikel_kArtikel = @Key
AND tBestellung.nStorno = 0 -- Stornierte Aufträge nicht beachten
AND tbestellung.cType = 'B'
GROUP BY kShop
) AS jVKDurchschnitt ON jVKDurchschnitt.kShop = tShop.kShop
 
Zuletzt bearbeitet:
  • Gefällt mir
Reaktionen: bilder_lf
Ähnliche Themen
Titel Forum Antworten Datum
Neu Artikel Filter laufende eBay Angebot funktioniert nicht - SQL Abfrage User helfen Usern - Fragen zu JTL-Wawi 3
Neu Artikelbeschreibung / Fotos werden beim eBay-Abgleich nicht zuverlässig übernommen eBay-Anbindung - Ideen, Lob und Kritik 0
Neu Ebay Beschreibungen plötzlich weg eBay-Anbindung - Fehler und Bugs 10
Neu BUG! eBay Lieferadresse wird als Rechnungsadresse übertragen eBay-Anbindung - Fehler und Bugs 8
Deutsche Post Brief Sendungsnummer wird nicht an eBay übertragen JTL-Wawi 1.9 0
Neu eBay Angebote bestehen lassen auf eBay bei 0 Bestand in WaWi User helfen Usern - Fragen zu JTL-Wawi 4
Neu Ebay Zustände bei Ameise Import JTL-Ameise - Fehler und Bugs 0
Neu ebay.co.uk Verkauf an europäischen Kunden - falscher MWST Satz JTL-Wawi - Fehler und Bugs 0
Neu wawi ameise ebay User helfen Usern - Fragen zu JTL-Wawi 6
Neu Menge zu Ebay eBay-Anbindung - Fehler und Bugs 0
Hochladen von Artikel zu Ebay klappt nicht JTL-Wawi 1.10 13
Neu Versandkostenberechnung ebay, Kleinpaket International. Wie berechnen in ebay ? eBay-Anbindung - Fehler und Bugs 0
eBay Open 2025 am 25.09.25 Messen, Stammtische und interessante Events 0
Neu Frage zur eBay-Artikelbeschreibung bei Variationskombinationen (Kindartikel mit eigenem Text und Bildern) eBay-Anbindung - Fehler und Bugs 5
Neu alte Aufträge ausliefern ohne Label drucken und Abgleich mit eBay User helfen Usern - Fragen zu JTL-Wawi 2
Ebay Angebot mit Kindartikel die keinen Bestand haben per Ameise importieren JTL-Wawi 1.6 5
Menge zu Ebay eBay-Anbindung - Fehler und Bugs 1
Neu Status der eBay Angebote exportieren Schnittstellen Import / Export 2
Neu FEHLER: eBay-Auktionen Upload nicht möglich, Fehlercodes helfen nicht weiter [Error 21917328 & 21920203] eBay-Anbindung - Fehler und Bugs 2
Neu ebay widerrufsbelehrung ändern Einrichtung und Installation von JTL-eazyAuction 1
Neu Ebay Anbindung geht nicht mehr... eBay-Anbindung - Fehler und Bugs 6
Probleme beim Import von eBay-Produkten in JTL – neue Artikel werden nicht übernommen eBay-Anbindung - Fehler und Bugs 5
Neu Quote nicht fristgerechter Versand - ebay - DHL JTL-ShippingLabels - Ideen, Lob und Kritik 14
Neu EazyAuction / eBay: Falsche Telefonnummern & Alias-Mails im Auftrag – Bug oder Feature? JTL-ShippingLabels - Fehler und Bugs 0
Neu Gleiche Designvorlage für eBay und JTL-Shop mit globalen Textbausteinen nutzen Allgemeine Fragen zu JTL-Shop 0
Neu Variantenartikel bei Ebay erweitern User helfen Usern - Fragen zu JTL-Wawi 8
Neu Ebay-SKU anpassen Arbeitsabläufe in JTL-Wawi 3
Neu Ebay Bestellungen über OrangeConnex Fullfilment - Versanddatenaustausch Schnittstellen Import / Export 0
Neu ebay-Angebote ändern JTL-Ameise - Fehler und Bugs 8
Neu auf ausländische ebay-Webseiten anbieten Einrichtung und Installation von JTL-eazyAuction 0
Neu Ameise - Ebay Vorlage Erstellen - Chaos nach Update JTL-Ameise - Fehler und Bugs 0

Ähnliche Themen