From 59b7575c53844bbe89b2fcc90d1fddb675f1e5d7 Mon Sep 17 00:00:00 2001 From: "sebastian.serfling" Date: Thu, 15 Aug 2024 08:38:34 +0200 Subject: [PATCH] add %Y-%m-%d to select --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 17bd69d..64ef1b1 100644 --- a/main.py +++ b/main.py @@ -30,7 +30,7 @@ def get_filtered_data(customer_id, service_id, start_date, end_date): # Prepare the query query = f""" - SELECT DATE_FORMAT(sr.reportingdate, '%Y-%m') AS month, + SELECT DATE_FORMAT(sr.reportingdate, '%Y-%m-%d') AS month, COUNT(DISTINCT sr.username) as count FROM Kunden.`services.reporting` sr JOIN Kunden.services s ON sr.service_ID = s.service_ID