Last active
September 2, 2022 20:27
-
-
Save Zmey56/0dd0c2a3e1704b134ff28fef5871d9a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query_msg_q = """ | |
select | |
toDate(time) as date | |
,count(distinct user_id) as users_msg | |
,count(user_id) as msg | |
, msg / users_msg as mpu | |
from simulator_20220620.message_actions | |
where toDate(time) between today() - 8 and today() - 1 | |
group by date | |
order by date | |
""" | |
data_msg = pd.DataFrame(ph.read_clickhouse(query=query_msg_q, connection=connection)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment