hello,
i am trying to write one query, but still getting not right results.
Here is how my table looks like:
id | country | number |
1 | usa | 3 |
2 | norway | 3 |
3 | palestine | 3 |
4 | sweden | 1 |
5 | norway | 2 |
6 | palestine | 7 |
7 | estonia | 2 |
I need to select the ones, which have "2" in field "number", but, if, the country do not have number "2", then to select countries which have "number" "3".
The result should be like this:
id |country |number |
1 |usa |3 |
3 |palestine |3 |
5 |norway |2 |
7 |estonia |2 |
Start Free Trial