From 67954dfbbe10b33369d72933adf37be2797de91e Mon Sep 17 00:00:00 2001 From: SebMelendez01 <78228475+SebMelendez01@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:15:14 -0500 Subject: [PATCH] C911: fixing mantle new and returning (#658) --- macros/metrics/get_fundamental_data_for_chain.sql | 8 ++++---- models/projects/mantle/core/ez_mantle_metrics.sql | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/macros/metrics/get_fundamental_data_for_chain.sql b/macros/metrics/get_fundamental_data_for_chain.sql index db83f43d..99e6780b 100644 --- a/macros/metrics/get_fundamental_data_for_chain.sql +++ b/macros/metrics/get_fundamental_data_for_chain.sql @@ -8,14 +8,14 @@ new_users as ( select count(distinct from_address) as new_users, - date_trunc('day', start_timestamp) as start_date + start_timestamp::date as start_date from min_date group by start_date ), {% if chain not in ("starknet") %} bot as ( select - raw_date, + raw_date::date as raw_date, count(distinct from_address) as low_sleep_users, count(*) as tx_n from {{ chain }}.prod_raw.ez_transactions @@ -24,7 +24,7 @@ ), sybil as ( select - raw_date, + raw_date::date as raw_date, engagement_type, count(distinct from_address) as sybil_users, count(*) as tx_n @@ -35,7 +35,7 @@ {% endif %} chain_agg as ( select - raw_date as date, + raw_date::date as date, max(chain) as chain, {% if chain not in ("starknet") %} --Starknet allows for multiple types of tokens to be used for gas sum(tx_fee) fees_native, diff --git a/models/projects/mantle/core/ez_mantle_metrics.sql b/models/projects/mantle/core/ez_mantle_metrics.sql index 3a5a02be..07f9ff06 100644 --- a/models/projects/mantle/core/ez_mantle_metrics.sql +++ b/models/projects/mantle/core/ez_mantle_metrics.sql @@ -27,6 +27,8 @@ select , dau , wau , mau + , new_users + , returning_users , fees , fees_native , l1_data_cost