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
Post a Comment