Okay I have two tables: Table 1 looks like this:
id age gender
1 10 M
2 11 F
3 11 F
And Table 2 looks like this (same with different values):
id age gender
1 11 F
2 12 M
3 10 M
Now I want my final output to look like the following:
age count
10 2
11 3
12 1
What is the most efficient way to achieve this?