Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sm-update-cake-dex-sw…
Browse files Browse the repository at this point in the history
…ap-bsc
  • Loading branch information
SebMelendez01 committed Jun 19, 2024
2 parents c79f7e2 + e311d6e commit 9f44594
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
5 changes: 0 additions & 5 deletions models/data_hubs/fact_daily_app_datahub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ with
ref("fact_pancakeswap_ethereum_gold"),
ref("fact_apex_trading_volume_gold"),
ref("fact_aevo_trading_volume_gold"),
ref("fact_moonwell_base_borrows_deposits_gold"),
ref("fact_quickswap_polygon_gold"),
ref("fact_fraxswap_ethereum_gold"),
ref("fact_trader_joe_arbitrum_gold"),
Expand Down Expand Up @@ -84,8 +83,6 @@ with
max(unique_traders) as unique_traders,
max(fees) as fees,
max(bridge_volume) as bridge_volume,
max(daily_borrows_usd) as daily_borrows_usd,
max(daily_supply_usd) as daily_supply_usd,
max(tvl) as tvl,
max(inflow) as inflow,
max(outflow) as outflow,
Expand Down Expand Up @@ -114,8 +111,6 @@ select
app_data_tagged.inflow as inflow,
app_data_tagged.outflow as outflow,
app_data_tagged.bridge_daa as bridge_daa,
app_data_tagged.daily_borrows_usd as daily_borrows_usd,
app_data_tagged.daily_supply_usd as daily_supply_usd,
app_data_tagged.tvl as tvl,
coingecko.coingecko_id as coingecko_id,
coalesce(
Expand Down
29 changes: 29 additions & 0 deletions models/projects/moonwell/core/ez_moonwell_metrics_by_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{
config(
materialized="table",
snowflake_warehouse="MOONWELL",
database="moonwell",
schema="core",
alias="ez_metrics_by_chain",
)
}}

with
moonwell_by_chain as (
{{
dbt_utils.union_relations(
relations=[
ref("fact_moonwell_base_borrows_deposits_gold"),
],
)
}}
)
select
moonwell_by_chain.date,
'moonwell' as app,
'DeFi' as category,
moonwell_by_chain.chain,
moonwell_by_chain.daily_borrows_usd,
moonwell_by_chain.daily_supply_usd
from moonwell_by_chain
where moonwell_by_chain.date < to_date(sysdate())
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="MOONWELL") }}
{{
fact_compound_v2_fork_lending(
"raw_moonwell_base_borrows_deposits", "base", "moonwell"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ config(materialized="table") }}
{{ config(materialized="table", snowflake_warehouse="MOONWELL") }}
select date, chain, app, category, daily_borrows_usd, daily_supply_usd
from {{ ref("fact_moonwell_base_borrows_deposits") }}
6 changes: 4 additions & 2 deletions models/staging/zksync/fact_zksync_revenue.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ with
where
lower(to_address) in (
lower('0x3dB52cE065f728011Ac6732222270b3F2360d919'),
lower('0xa0425d71cB1D6fb80E65a5361a04096E0672De03')
)
lower('0xa0425d71cB1D6fb80E65a5361a04096E0672De03'),
lower('0xa8CB082A5a689E0d594d7da1E2d72A3D63aDc1bD'),
lower('0x32400084C286CF3E17e7B677ea9583e60a000324')
)
and block_timestamp >= dateadd(day, -5, (select min(date) from gas))
group by 1
)
Expand Down

0 comments on commit 9f44594

Please sign in to comment.