There is a table i work in Mysql. There are words and values. Values is Boolean like ‘1’ or ‘0’. Words can repeat more than once. And their values vary. For example one “def” can be ‘0’ while other is ‘1’. What i am trying to find is:
- The values only have zero values. And if there is more than once of this word take only one word.
- But, “def” has ‘0’ value. Also ‘1’ value. It must be only ‘0’ values!
The table is like:
word value ---- ----- abc 1 abc 1 def 0 def 1 def 0 xyz 0 xyz 0 xyz 0 xxx 1 zzz 0
I really don’t understand what you’re trying to obtain.
Anyway I try:
If you want to sort words alphabetically, you can do
EDITED in response to user comment:
Try this:
or