Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Partner
Partner

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
Esteemed Contributor III

Re: Certification Question

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

10 Replies
Chanty4u
Esteemed Contributor III

Re: Certification Question

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
Valued Contributor

Re: Certification Question

Hi Chaitanya,

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


Please find the attached file for details.


Thanks & Regards,

Neha

Partner
Partner

Re: Certification Question

Hi Chanty,

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

Partner
Partner

Re: Certification Question

Hi Neha,

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

Not applicable

Re: Certification Question

Hi Chaithanya,

Chanty4u  has given correct output..

Partner
Partner

Re: Certification Question

Hi Manoj,

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

Partner
Partner

Re: Certification Question

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..

Partner
Partner

Re: Certification Question

In that case also it will create 3 columns only

neha_shirsath
Valued Contributor

Re: Certification Question

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