Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
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.
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.
Thank you! You explained it very thoroughly and it worked. Thanks for making it easy to understand for a newbie like me