I have 2 tables which I’d like to join and..
A:
ID Otherfields..
1 ...
2
3
4
B:
ID aId Otherfields..
1 1 ...
2 1
3 2
4 1
So I’m perfectly capable of joining them by a.Id but how do get I get the count for the matches in Table B, like:
a.id count(b)
1 3
2 1
I figured it must be something with count() over() but cannot recall the exact use.
Thanks!
You can simply do this: