I have a table that I want to be able to query to get rows that are in a defined sets of value. I can create new table structures if required as this is temporary data used for a leaderboard of sorts.
The Token Sets can be created by grouping many tokens together. What I want to do it find all the Addresses that have ALL tokens in a defined set.
Not sure if I need to re model the data, or if I'm just missing a simple query setup.
So in the data below I would want to return Address 1234 based on TokenSet "SetA".
Token Address
TokenID | Address |
---|---|
AA | 1234 |
BB | 1234 |
CC | 1234 |
DD | 1234 |
AA | 4321 |
CC | 4321 |
Token Sets
TokenID | Set |
---|---|
AA | SetA |
BB | SetA |
CC | SetA |