Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chaitanyajami
Partner - Creator
Partner - Creator

Certification Question

  1. Two table structure was given and after left join, what is the no. of outcome records (no. of rows and columns)

Table A

ID, Columnc

A,111

B,222

C,333

Table B

ID,ColumnC

A, XXX

B,YYY

C,kkk

D,aaa

E,bbb

answer to above question must be 3 rows, 2 columns as per my understanding but correct answer is below one , how is it possible ?

  1. 5 rows,3columns
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

AM not sure try to like below

b:

LOAD * INLINE [

    ID, ColumnC

    A, XXX

    B, YYY

    C, kkk

    D, aaa

    E, bbb

];

left join(b)

a:

LOAD * INLINE [

    ID, Columnc

    A, 111

    B, 222

    C, 333

];

left.PNG

View solution in original post

10 Replies
Chanty4u
MVP
MVP

AM not sure try to like below

b:

LOAD * INLINE [

    ID, ColumnC

    A, XXX

    B, YYY

    C, kkk

    D, aaa

    E, bbb

];

left join(b)

a:

LOAD * INLINE [

    ID, Columnc

    A, 111

    B, 222

    C, 333

];

left.PNG

neha_shirsath
Specialist
Specialist

Hi Chaitanya,

Answer to above question must be 3 rows, 2 columns is correct.


Please find the attached file for details.


Thanks & Regards,

Neha

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Chanty,

if tables is in reverse order yeah i agree but with the above i hope its not the output.

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Neha,

Thank you, even i got 3 rows , 2 columns i guess there is a mistake

Not applicable

Hi Chaithanya,

Chanty4u  has given correct output..

chaitanyajami
Partner - Creator
Partner - Creator
Author

Hi Manoj,

Ok but may be if table A becomes B , it might work Thank you

shraddha_g
Partner - Master III
Partner - Master III

Reason is ColumnC and Columnc are 2 different columns...

thats why it created 3 Columns after left join..

Chanty4u's reply gives justification of the answer..

5 rows and 3 columns is correct..

shraddha_g
Partner - Master III
Partner - Master III

In that case also it will create 3 columns only

neha_shirsath
Specialist
Specialist

Hi,

Even table gets reverse then with the Left join rule (The keyword LEFT will retain rows from the left table but only matching rows from the right table) the Chatys output is correct.


Only the table no of rows difference is there that's why the output must b differ.


Thanks,

Neha