I have a mysql query that returns more than one line for different id with different values in this condition Need to eliminate id with some data.
Example
please
It probably flows Powerful is unattractive, but minimal work is done:
Select ID, name, value from (select f * *, c count * from & lt; table & f; (selection * *, Count (*) 'count' from & lt; table & gt; group by id) c where f.id = c.id) c (where name = 'a1' and count = 1) or name! From the 'A1' group id
you will find the 'first' row for the remaining (not random) for the id = 4, / code>
Comments
Post a Comment