0

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'

1 Answer 1

2

Use a . instead of ,:

ON a.frm_id = b.to_id

instead of

ON a,frm_id = b.to_id
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.