By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| uid |
|---|
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 2 |
| 2 |
| count(case when uid=0 then uid end)+ count(distinct case when uid!=0 then uid end) |
|---|
| 11 |
| uid |
|---|
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 2 |
| 2 |
| count(case when uid=0 then uid end)+ count(distinct case when uid!=0 then uid end) |
|---|
| 11 |