[英]"Column name 'identifier' specified more than once" in AWS Athena
當我嘗試從 AWS Athena 中的查詢創建視圖時,我收到錯誤消息,例如“多次指定列名‘標識符’”。 如何指定 table1.identifier 與 table3.identifier 不同?
此查詢將運行,但當我嘗試從中創建視圖時會出現錯誤:
SELECT
table1.name,
table1.identifier,
table2.question_instructions,
table2.value,
table3.identifier,
table2.date
FROM "table1"
JOIN table4 ON table1.id = table4.instrument_id
JOIN table2 ON table4.id = table2.question_id
JOIN table3 ON table2.user_id = table3.user_id
WHERE question_id = 'b194424f7fdd41ae9';
你需要給他們不同的名字。 例如:
SELECT
table1.name,
table1.identifier,
table2.question_instructions,
table2.value,
table3.identifier table3_identifier_alias, -- or use any other appropriate
table2.date
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.