How to group by week and distinct by day in postgresql
Sample contents are: id created_dt data 1 2023-01-14 11:52:41 {"customers": 1, "payments: 2} 2 2023-01-15 11:53:43 {"customers": 1, "payments: 2} 3 2023-01-18 11:51:45 {"customers": 1, "payments: 2} 4 2023-01-15 11:50:48 {"customers": 1, "payments: 2} ID 4 or 2 should be…