[英]"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.