Table A:
id | pnumber | type
45 | 1111 | a
98 | 1314 | a
223 | 2151 | b
45 | 1111 | a
How can i get the values ‘name’ and ‘pnumber’ from Table A where type=‘a’ and insert it into table B
and if there is 2 rows with the same id and pnumber it will only add 1 row and write add the sum to the total
for ex:
Table B should look like that:
id | pNumber | Total Found
45 | 1111 | 2
98 | 1314 | 1
223| 2151 | 1