I have 2 tables where some records will be identical (except id)
Table a:
id, numA, codeA 6, 34, aa 7, 34, bb 8, 567, bc
Table B
id, numB, codeB 1, 34, aa 2, 34, bb 3, 567, bc
I need to run a query in table B that will check if a given combination of number and code exists in table A and give the result in this format:
num, concat code 34, (aa,bb) 567, (bc)
source share