I have 2 tables that I am trying to join and my results are being duplicated.
I am trying to return the following question.
Inner join AccountsTbl on accountstbl.acctnum = positionstbl.acctnum
where acctactive = true
The problem I am getting, say for example with acctnum 11111, is the results should be 2 lines... quantity total = 2.
But the way I wrote the query is results are 4 lines, quantity 4.
I know it is because I have the same account in twice but I don't know how to achieve the results I am trying to.
I am also not married to the structure of the table.