Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED),3.8 CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED)

How to CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED),3.8 CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED)

Explorer

Encountered "Error while compiling statement FAILED: SemanticException [Error 10002]: Line 2:29 Invalid column reference 'total_hours' [ERROR_STATUS]

,

I encountered the Error while compiling statement: FAILED: SemanticException [Error 10002]: Line 2:29 Invalid column reference 'total_hours' [ERROR_STATUS]

3 REPLIES 3
Highlighted

Re: How to CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED),3.8 CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED)

Expert Contributor

Hi @Hak Tiong Ong,

Can you post the entire script you are running? I'm not seeing where you are referencing total_hours in what you have posted.

Thanks!

John

Highlighted

Re: How to CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED),3.8 CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED)

Explorer

Hi @jwhitmore

Found my mistake miss out the total_hours for the line below, thank you very much.

JOIN (SELECT driverId, sum(hours_logged)total_hours, sum(miles_logged)total_miles FROM timesheet GROUP BY driverId ) t 
Highlighted

Re: How to CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED),3.8 CREATE QUERY TO JOIN THE DATA (DRIVERID, NAME, HOURS_LOGGED, MILES_LOGGED)

Expert Contributor

Excellent! Glad to hear it.

Don't have an account?
Coming from Hortonworks? Activate your account here