Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Invalid Expression Error: Left Join

Can someone help me understand why I'm getting the attached error when I try to run my script? I've pasted and attached my code.

Thanks,

Ben

------------------------------------------

uld_count_url:

LOAD domain_id,

     id as normalized_url_id,

     url as normalized_url

FROM

[silo qvds\normalized_url.qvd]

(qvd);

LEFT JOIN (uld_count_url)

//url:

LOAD id as url_id,

     normalized_url_id

//     url

FROM

[silo qvds\url.qvd]

(qvd);

LEFT JOIN (uld_count_url)

//uld_count_url:

LOAD id as uld_count_url_id,

     url_id,

     date(date_created, 'MM/DD/YYYY') as date_created,

     all,

     com,

     edu,

     gov,

     net,

     org,

     dofollow,

     nofollow,

     sitewide,

     not_sitewide,

     refdomains,

     max(uld_count) as uld_count

FROM

[silo qvds\uld_count_url.qvd]

(qvd)

  where monthstart(date_created) = monthstart(today())

// group by url

  ;

//STORE uld_count_url INTO uld_count_url.qvd (qvd);

1 Solution

Accepted Solutions
Digvijay_Singh

You are aggregating your rows through Max function, so you need to use Group By clause and mention all the fields which are available after load statement except those having aggregation function like Max you have used.

So you are grouping rows having same values in the fields mentioned in your group by clause and you want to find the max of uld_ count against those rows.

View solution in original post

2 Replies
Digvijay_Singh

You are aggregating your rows through Max function, so you need to use Group By clause and mention all the fields which are available after load statement except those having aggregation function like Max you have used.

So you are grouping rows having same values in the fields mentioned in your group by clause and you want to find the max of uld_ count against those rows.

Anonymous
Not applicable
Author

Thank you! You explained it very thoroughly and it worked. Thanks for making it easy to understand for a newbie like me