I want to count the amount of duplicates and have the corresponding number of duplicates in a column next to it. I need two different version for two different queries and I cant seem to figure it out. Below are two tables of what I need. Please any help would be amazing!!
This table is with one source and counts the number of ID's and puts the correct count in the Duplicate Count Column where it prints outs out the number of duplicates in every row where the duplicate exists. There is also other information in-between ID and Duplicate Count but these are the columns I need it to count the duplicates through the other information can be the same or different.
<tbody>
</tbody>
This Table is the same except has different sources that need to be separated
<tbody>
</tbody>
This table is with one source and counts the number of ID's and puts the correct count in the Duplicate Count Column where it prints outs out the number of duplicates in every row where the duplicate exists. There is also other information in-between ID and Duplicate Count but these are the columns I need it to count the duplicates through the other information can be the same or different.
ID | Source | Duplicate Count |
1 | apple | 2 |
1 | apple | 2 |
2 | apple | 3 |
2 | apple | 3 |
2 | apple | 3 |
3 | apple | 1 |
4 | apple | 1 |
5 | apple | 1 |
<tbody>
</tbody>
This Table is the same except has different sources that need to be separated
ID | Source | Duplicate Count |
1 | apple | 2 |
1 | apple | 2 |
1 | orange | 3 |
3 | apple | 2 |
2 | orange | 1 |
3 | apple | 1 |
1 | orange | 3 |
1 | orange | 3 |
2 | apple | 1 |
3 | apple | 2 |
3 | orange | 1 |
<tbody>
</tbody>