I have the following table structure:
user: user_id|user_name
1 |John Doe
2 |Alex
data: data_id|data_kind|data_value
1 |123 |Hello
2 |456 |World
3 |123 |GoodBye
UNIQUE(data_kind, data_value)
user_data: user_id|data_id
1 |1
1 |2
2 |3
2 |2
UNIQUE(user_id, data_id)
How would I be able to query all users (John Doe) which have (data_kind=123,data_value=’Hello’) and (data_kind=456,data_value=’World’) ?