sql - hive error, getting an EOF error in subtract query -


i getting an, missing eof @ '-' near hab, query part looks correct. not sure how implement minus in hive.

select     a.playerid id,     a.yearid yearid,     (b.hab - a.eg) hab-eg      (select         playerid,         yearid,         (e/g) eg     fielding     (             yearid > 2005             , yearid < 2009             , g > 20              )     ) join     (select         id,         year,         (hits/ab) hab     batting     where(              year > 2005             , year < 2009              , ab > 40              )     ) b on a.playerid = b.id , a.yearid = b.year; 

alias names should quoted backtick character (``) characters, when include additional character such space or dash.
use following:

select     a.playerid id,     a.yearid yearid,     (b.hab - a.eg) `hab-eg` 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -