I have a table containing account information:
And another table, containing transactions information:
I'd like to retrieve both the titles from transactions.from_acc_id and transactions.to_acc_id
So far, I'm only able to retrieve either one or the other with the following JOIN:
SELECT transactions.transaction_type,
transactions.from_acc_id,
transactions.to_acc_id,
transactions.amount,
account.title AS "ACCOUNT DESTINATION"
FROM transactions
JOIN account
ON transactions.to_acc_id = account.acc_id
This gives me the title of transactions.to_acc_id.
How can I add another field containing the title of transactions.from_acc_id with the same SELECT statement, please ?
Thanks
EDIT: I'd like to keep all field from the Select statement, adding the title of transactions.from_acc_id where is pertinent


