Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm currently trying to expand the SalesTable which has some markets with a table that contains all markets (MarketsTable). A visual example would be:
SalesTable:
sku | asin | marketName |
XX | ABC | FR |
YY | ACD | DE |
MarketsTable:
marketName |
FR |
DE |
USA |
End result should be something like this:
sku | asin | marketName |
XX | ABC | FR |
XX | ABC | DE |
XX | ABC | USA |
YY | ACD | FR |
YY | ACD | DE |
YY | ACD | USA |
Currently I have just loaded them in Data Load Editor and I am really stuck 😕
LIB CONNECT TO 'LOCAL';
_markets:
LOAD name AS marketName;
SELECT "name"
FROM "public"."market";
_sale_event:
LOAD skuSku as sku,
asin,
marketName
Where platform='amazon';
SELECT "asin",
"skuSku",
"marketName"
FROM "public"."sale_event";
How this could be acheived or where I could read more about this?
Try this:
LIB CONNECT TO 'LOCAL';
_sale_event:
LOAD skuSku as sku,
asin
Where platform='amazon';
SELECT "asin",
"skuSku"
FROM "public"."sale_event";
_markets:
left join(_sale_event)
LOAD name AS marketName;
SELECT "name"
FROM "public"."market";
The result will be:
Try this:
LIB CONNECT TO 'LOCAL';
_sale_event:
LOAD skuSku as sku,
asin
Where platform='amazon';
SELECT "asin",
"skuSku"
FROM "public"."sale_event";
_markets:
left join(_sale_event)
LOAD name AS marketName;
SELECT "name"
FROM "public"."market";
The result will be: