| date | train | condition1 | condition2 |
|---|---|---|---|
| 1 | train1 | 0 | false |
| 2 | train2 | 1 | true |
| 1 | train3 | 1 | true |
| 1 | train4 | 5 | false |
I want to create a table to count the trains
- group by date
- count by conditions
| date | train count | condition1 > 0 | condition2 is true | condition1 > 0 and condition2 is false |
|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 0 |
| 2 | 3 | 2 | 1 | 1 |
How can I achieve so?