如何将下面的 mysql 查询转换为 sql 炼金术?
SELECT * FROM `table_a` ta, `table_b` tb where 1
AND ta.id = tb.id
AND ta.id not in (select id from `table_c`)
到目前为止,我有这个为 sql 炼金术:
query = session.query(table_a, table_b)
query = query.filter(table_a.id == table_b.id)