I have a JSON column which on persons table which stores the best activities people have done in countries they visited like this...
{
"countries": [
{
"name": "Ireland",
"bestActivity": {
"name": "Drinking"
}
},
{
"name": "Scotland",
"bestActivity": {
"name": "Dancing"
}
}
]
}
Someone else might be:
{
"countries": [
{
"name": "Ireland",
"bestActivity": {
"name": "Football"
}
},
{
"name": "England",
"bestActivity": {
"name": "Golf"
}
}
]
}
I want to select all the people who visited Ireland and with best activity of Drinking in Ireland and also visited Scotland and with the best activity of Drinking.
Really struggling. Any tips?