Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anat0m
Contributor
Contributor

Expanding table with another table values

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?

 

Labels (2)
1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II

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:

2022-02-10 08_21_55-Window.png

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
micheledenardi
Specialist II
Specialist II

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:

2022-02-10 08_21_55-Window.png

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.