我正在与下面的查询中的主题错误作斗争:似乎错误是在所指示的行中;我需要指定orders__line_items.id否则'id'是模糊的。我已经尝试了各种组合的括号,全名等。.
SELECT
orders__line_items.id::character varying AS id, <-- ERROR SEEMS TO BE HERE
CAST(orlin.created_at::timestamptz AS date) AS timestamp,
orlin.price_set__shop_money__amount AS price,
orlin.quantity AS quantity,
orlin._sdc_source_key_id as prova,
orlin.product_id as product_id
FROM
(SELECT * FROM orders__line_items
LEFT JOIN shopify_a100."orders" ON _sdc_source_key_id =
shopify_a100."orders"."id"
LEFT JOIN shopify_a100."products" ON "product_id" =
shopify_a100."products"."id") AS orlin
字符串
1条答案
按热度按时间evrscar21#
发生错误的原因是
SELECT
无法识别orders__line_items
,您必须在子查询中准备选定的列。如果
id
是唯一一个不明确的列,这里有一个解决方案:字符串