I'm interested in doing something like in this question, where I only get the result, if the column actually contains all the words given to it.
For example, if I have two columns, one being a timestamp, the other being the weather, I want to get only the timestamps where the weather was cloudy
, rainy
, snowy
, and not if it was only cloudy
, rainy
. An example of the above would be sort of like:
SELECT distinct timestamp FROM mytable
WHERE Weather LIKE 'snowy'
OR Weather LIKE 'cloudy'
OR Weather LIKE 'rainy'
Which would return something like:
2017-09-22 snowy
2017-09-22 snowy
2017-09-22 cloudy
2017-09-22 rainy
2017-09-22 cloudy
But not any results from 2017-09-21
, because it might only have been snowy
and rainy
that day etc.
The example query I did above would return all timestamps, as long as the weather matched the criteria.