Dear All,
I am having trouble with clustering some data. So there are 2 "shipping_courier" and "Order_date" and a 3 filed in which I have distinct count of the number of orders. What I whould like to make if an if where I i can state of in day X courier Y had Z orders, let's say < 3than 3 if greater than 3, 6 etc, but I am having trouble with the expresion.
shipping_courier | Order_date | count(DISTINCT id) | Cluster |
[AAD-HK] | 2020-12-07 | 1 | 3 |
[AAD-HK] | 2020-12-24 | 1 | 3 |
[AAD-HK] | 2020-12-12 | 2 | 3 |
[AAD-HK] | 2020-12-22 | 3 | 3 |
[AAD-HK] | 2020-12-28 | 3 | 3 |
[AAD-HK] | 2020-12-04 | 4 | 6 |
[AAD-HK] | 2020-12-21 | 4 | 6 |
[AAD-HK] | 2020-11-30 | 5 | 6 |
[AAD-HK] | 2020-12-02 | 5 | 6 |
[AAD-HK] | 2020-12-08 | 5 | 6 |
[AAD-HK] | 2020-12-11 | 6 | 6 |
[AAD-HK] | 2020-12-23 | 7 | 9 |
[AAD-HK] | 2020-12-05 | 8 | 9 |
[AAD-HK] | 2020-12-09 | 10 | 12 |
[AADK] | 2020-12-13 | 2 | 3 |
[AADK] | 2020-12-19 | 2 | 3 |
[AADK] | 2020-12-03 | 4 | 6 |
[AADK] | 2020-12-17 | 5 | 6 |
[AADK] | 2020-12-08 | 6 | 6 |
[AADK] | 2020-12-05 | 8 | 9 |
[AADK] | 2020-12-09 | 9 | 9 |
[AADK] | 2020-12-15 | 10 | 12 |