I have this table:
id user value
1 A Cool
2 A Cool
3 A Cool
2 A Warm
3 A Warm
4 B Cool
5 C Cool
5 C Warm
What I want to get here is the record that has the value of "Cool" and that it doesn't have "Warm". This can be identified by the ID and the User column.
I tried doing something like this:
SELECT DISTINCT id, user FROM log_table where value= 'Cool'
But this will still return the record that also has "Warm"
Expected output is:
id user value
1 A Cool
4 B Cool
Another problem I found with Distinct is that it doesn't let me add * or I don't how to do it since when I tried it was an error. Can I add concat after distinct as well? Without it being treated in the distinct function?
I may be using Distinct wrongly here.