Reputation: 223
I have a database:
pID |type| City |
------------------
Z0D12 | Z | Amsterdam
XOD12 | X | Paris
YOD12 | Y | Madrid
GOD12 | G | Amsterdam
GOD12 | G | Amsterdam
I have a composite key with a date row so the pID can be a duplicate
I want to display the amount of times a city occurs per type:
City |type | amountoftimes |
------------------
Amsterdam | Z | 1
Amsterdam | G | 2
Paris | X | 1
Madrid | Y | 1
How do I do this?
Upvotes: 0
Views: 30