add %Y-%m-%d to select
parent
f3383bbc40
commit
59b7575c53
2
main.py
2
main.py
|
|
@ -30,7 +30,7 @@ def get_filtered_data(customer_id, service_id, start_date, end_date):
|
||||||
|
|
||||||
# Prepare the query
|
# Prepare the query
|
||||||
query = f"""
|
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
|
COUNT(DISTINCT sr.username) as count
|
||||||
FROM Kunden.`services.reporting` sr
|
FROM Kunden.`services.reporting` sr
|
||||||
JOIN Kunden.services s ON sr.service_ID = s.service_ID
|
JOIN Kunden.services s ON sr.service_ID = s.service_ID
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue