2

以下在 SQLite Manager 中有效,但在 Python 中无效。我收到以下错误:

sqlite3.OperationalError:没有这样的列:domain_list.short_name

我已经尝试取出“AS domain_list”并仅引用“short_name”和“websites.short_name”,但它在 Python 中仍然不起作用。但在 SQLite 管理器中。它只适用于子查询,只是当我将子查询加入 domain_info 表时。

有任何想法吗?

SELECT
*
FROM
    (
        SELECT
            websites.short_name 
        FROM
            websites
        INNER JOIN product_info ON product_prices.product_info_id = product_info.id
        WHERE product_info.archive = 1
        GROUP BY
            websites.short_name
    ) AS domain_list
LEFT JOIN
    domain_info
ON
    domain_list.short_name = domain_info.domain
ORDER BY
    last_checked
4

0 回答 0