My Sql query is
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
Where OneWayNetTransactionRes
is a view.
CREATE VIEW `OneWayNetTransactionRes` AS
SELECT frm_id, to_id, sum(amount) total_amount
FROM TransactionResolution
GROUP BY frm_id, to_id
Yet I get the error
1066: Not unique table/alias: 'b'
Use a .
instead of ,
:
ON a.frm_id = b.to_id
instead of
ON a,frm_id = b.to_id