0
我正在嘗試在Hive中執行類似以下的操作。我如何在Hive中將列定義爲子查詢?這在Hive中可能嗎?作爲子查詢選擇的Hive列
hive -e "
select
distinct i.SearchListingID,
(select count(*)
from calls c
where c.ServiceID = i.SearchListingID
) as CallsCount
from Impressions i
where i.yyyymmdd = 20120401
limit 10" > ImpressionCalls.txt
Hive history file=/tmp/jd/hive_job_log_jd_201205222049_550931420.txt
FAILED: Parse Error: line 4:1 cannot recognize input near 'select' 'count' '(' in expression specification
謝謝!你讓我走上正軌。我不得不添加一個「通過i.SearchListingID組」來使其運行。 –