以下のエラーが出ます。何が間違ってますか?
エラーメッセージ:
FAILED: ParseException line 1:2 cannot recognize input near '(' 'Select' '*'
クエリ:
(
Select
*
, Cast(Concat(Substr(timestamp, 1, 4), '-', Substr(timestamp, 5, 2), '-', Substr(timestamp, 7, 2), ' ', Substr(timestamp, 9, 2), ':', Substr(timestamp, 11, 2), ':', Substr(timestamp, 13, 2)) As timestamp) As fcd_timestamp
From
test
Where
st='${env:20151001}'
And '${env:lastDate}' <= Substr(timestamp, 1, 8)
And Substr(timestamp, 1, 8) <= '${env:1101}'
And Substr(timestamp, 1, 8) <= Substr(up_time, 1, 8)
) axis