This IMPALA sub query restriction consumed too much of my time. So I decided to post here to save people some time.
If you are making an inner query for the FROM part you cant make your standard SQL to work. I.e:
select count(*) from (SELECT * from mytable WHERE id="12345")
is not working giving the following error.
ERROR: AnalysisException: Syntax error in line 1: ...WHERE id="12345") ^ Encountered: EOF Expected: AS, IDENTIFIER
CAUSED BY: Exception: Syntax error