Table for counting items:
ID COUNT
1 10
2 0
3 12
4 1
5 5
6 10
7 9
8 9
9 11
10 0
Table-pedia with info about items:
ID NAME FEAT1 FEAT2
1 Nanan R 20
2 Meowth S 0
3 Nanan R 13
4 Nanan R 12
5 Uaua L 20
6 Bobz R 0
7 Lawkz S 2
8 Ughtht L 1
9 Ughtht L 444
...
Table three:
NAME FEAT1 COUNT
Nanan R 23
Ughtht L 20
Uaua L 5
...
Question is about table 3: how to make a database function that will create it? (ID cell in tables 1 & 2 is just the key to connect them.)
Unique item NAME (Table 2), FEAT1 of the item (Table 2), my COUNT of item same name (Table 1).
How do I make a relation which will check what IDs are shared by same NAME (Table 2) and then take those ID and sum their COUNT from Table 1?