I have 2 tables:
Table 1: only had TranId - 4 transaction records
Table 2: TranId, Member Id - - 4 transaction records for same member in table 1
I would like to pick a transaction record group by the member id.
Please help me with query. I have tried below - but putting the transaction id in the record is the problem and dosent return 1 records:
select b.tran_id from table1 a
join table2 b on a.tran_id = b.trans_id
group by a.member_id, b.trans_unique_id
Table 1: only had TranId - 4 transaction records
Table 2: TranId, Member Id - - 4 transaction records for same member in table 1
I would like to pick a transaction record group by the member id.
Please help me with query. I have tried below - but putting the transaction id in the record is the problem and dosent return 1 records:
select b.tran_id from table1 a
join table2 b on a.tran_id = b.trans_id
group by a.member_id, b.trans_unique_id