我的 Sql 查询是
Select a.sum_total FROM
OneWayNetTransactionRes a
LEFT OUTER JOIN
OneWayNetTransactionRes b
ON
a,frm_id = b.to_id
AND a.to_id = b.frm_id
哪里OneWayNetTransactionRes
有风景。
CREATE VIEW `OneWayNetTransactionRes` AS
SELECT frm_id, to_id, sum(amount) total_amount
FROM TransactionResolution
GROUP BY frm_id, to_id
然而我得到了错误
1066: Not unique table/alias: 'b'