Reputation: 3392
I need the query to group by name
and, if one of the is_new
is 1
, the resulting value should be 1
.
Current rows:
+--------+--------+
| name | is_new |
+--------+--------+
| a | 0 |
| a | 0 |
+--------+--------+
| b | 0 |
| b | 1 |
+--------+--------+
| c | 1 |
| c | 1 |
+--------+--------+
Expected query result:
+--------+--------+
| name | is_new |
+--------+--------+
| a | 0 |
| b | 1 |
| c | 1 |
+--------+--------+
Upvotes: 2
Views: 452