-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0 parents
commit b44f6b9
Showing
4,045 changed files
with
65,021 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...nthetix/models/marts/arbitrum/mainnet/core/fct_core_account_activity_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
|
||
with delegated as ( | ||
select distinct | ||
block_timestamp, | ||
account_id, | ||
'Delegated' as account_action | ||
from "analytics"."prod_raw_arbitrum_mainnet"."core_delegation_updated_arbitrum_mainnet" | ||
), | ||
|
||
withdrawn as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
'Withdrawn' as account_action | ||
from "analytics"."prod_raw_arbitrum_mainnet"."core_withdrawn_arbitrum_mainnet" | ||
), | ||
|
||
claimed as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
'Claimed' as account_action | ||
from "analytics"."prod_raw_arbitrum_mainnet"."core_rewards_claimed_arbitrum_mainnet" | ||
), | ||
|
||
combined as ( | ||
select * from delegated | ||
union all | ||
select * from withdrawn | ||
union all | ||
select * from claimed | ||
) | ||
|
||
select | ||
block_timestamp, | ||
account_action, | ||
account_id | ||
from combined |
64 changes: 64 additions & 0 deletions
64
...hetix/models/marts/arbitrum/mainnet/core/fct_core_account_delegation_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
with delegation_changes as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
pool_id, | ||
collateral_type, | ||
|
||
amount / 1e18 | ||
|
||
- LAG( | ||
amount / 1e18 | ||
, 1, 0) over ( | ||
partition by | ||
account_id, | ||
pool_id, | ||
collateral_type | ||
order by | ||
block_timestamp | ||
) as change_in_amount | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_delegation_updated_arbitrum_mainnet" | ||
), | ||
|
||
cumulative_delegation as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
pool_id, | ||
collateral_type, | ||
SUM(change_in_amount) over ( | ||
partition by | ||
pool_id, | ||
account_id, | ||
collateral_type | ||
order by | ||
block_timestamp | ||
) as cumulative_amount_delegated, | ||
ROW_NUMBER() over ( | ||
partition by | ||
pool_id, | ||
account_id, | ||
collateral_type | ||
order by | ||
block_timestamp desc | ||
) as rn | ||
from | ||
delegation_changes | ||
) | ||
|
||
select | ||
block_timestamp as ts, | ||
pool_id, | ||
collateral_type, | ||
cumulative_amount_delegated as amount_delegated, | ||
CAST( | ||
account_id as text | ||
) as account_id | ||
from | ||
cumulative_delegation | ||
where | ||
rn = 1 | ||
order by | ||
block_timestamp, | ||
collateral_type |
49 changes: 49 additions & 0 deletions
49
...tix/models/marts/arbitrum/mainnet/core/fct_core_active_stakers_daily_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
|
||
with delegation_updated as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
amount | ||
from "analytics"."prod_raw_arbitrum_mainnet"."core_delegation_updated_arbitrum_mainnet" | ||
), | ||
|
||
dim as ( | ||
select | ||
d.block_date, | ||
accounts_unique.account_id | ||
from ( | ||
select | ||
generate_series( | ||
date_trunc('day', date('2023-12-15')), | ||
date_trunc('day', current_date), '1 day'::interval | ||
) as block_date | ||
) as d | ||
cross join ( | ||
select distinct account_id from delegation_updated | ||
) as accounts_unique | ||
), | ||
|
||
stakers as ( | ||
select | ||
dim.block_date, | ||
dim.account_id, | ||
case | ||
when coalesce(last(delegation_updated.amount) over ( | ||
partition by dim.account_id | ||
order by dim.block_date | ||
rows between unbounded preceding and current row | ||
), 0) = 0 then 0 | ||
else 1 | ||
end as is_staking | ||
from dim | ||
left join delegation_updated on | ||
dim.block_date = date(delegation_updated.block_timestamp) | ||
and dim.account_id = delegation_updated.account_id | ||
) | ||
|
||
select | ||
block_date, | ||
sum(is_staking) as nof_stakers_daily | ||
from stakers | ||
group by block_date |
234 changes: 234 additions & 0 deletions
234
compiled/synthetix/models/marts/arbitrum/mainnet/core/fct_core_apr_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
|
||
|
||
with pnl_hourly as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
collateral_value, | ||
debt, | ||
hourly_pnl, | ||
hourly_issuance, | ||
rewards_usd, | ||
hourly_pnl_pct, | ||
hourly_rewards_pct, | ||
hourly_total_pct, | ||
SUM( | ||
COALESCE( | ||
hourly_issuance, | ||
0 | ||
) | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
) as cumulative_issuance, | ||
SUM( | ||
hourly_pnl | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
) as cumulative_pnl | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
avg_returns as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
AVG( | ||
hourly_pnl_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '24 HOURS' preceding | ||
and current row | ||
) as avg_24h_pnl_pct, | ||
AVG( | ||
hourly_pnl_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '7 DAYS' preceding | ||
and current row | ||
) as avg_7d_pnl_pct, | ||
AVG( | ||
hourly_pnl_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '28 DAYS' preceding | ||
and current row | ||
) as avg_28d_pnl_pct, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '24 HOURS' preceding | ||
and current row | ||
) as avg_24h_rewards_pct, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '7 DAYS' preceding | ||
and current row | ||
) as avg_7d_rewards_pct, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '28 DAYS' preceding | ||
and current row | ||
) as avg_28d_rewards_pct, | ||
AVG( | ||
hourly_total_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '24 HOURS' preceding | ||
and current row | ||
) as avg_24h_total_pct, | ||
AVG( | ||
hourly_total_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '7 DAYS' preceding | ||
and current row | ||
) as avg_7d_total_pct, | ||
AVG( | ||
hourly_total_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
ts | ||
range between interval '28 DAYS' preceding | ||
and current row | ||
) as avg_28d_total_pct | ||
from | ||
pnl_hourly | ||
), | ||
|
||
apr_calculations as ( | ||
select | ||
pnl_hourly.ts, | ||
pnl_hourly.pool_id, | ||
pnl_hourly.collateral_type, | ||
pnl_hourly.collateral_value, | ||
pnl_hourly.debt, | ||
pnl_hourly.hourly_pnl, | ||
pnl_hourly.cumulative_pnl, | ||
pnl_hourly.hourly_issuance, | ||
pnl_hourly.cumulative_issuance, | ||
pnl_hourly.rewards_usd, | ||
pnl_hourly.hourly_pnl_pct, | ||
pnl_hourly.hourly_rewards_pct, | ||
-- total pnls | ||
avg_returns.avg_24h_total_pct * 24 * 365 as apr_24h, | ||
avg_returns.avg_7d_total_pct * 24 * 365 as apr_7d, | ||
avg_returns.avg_28d_total_pct * 24 * 365 as apr_28d, | ||
-- pool pnls | ||
avg_returns.avg_24h_pnl_pct * 24 * 365 as apr_24h_pnl, | ||
avg_returns.avg_7d_pnl_pct * 24 * 365 as apr_7d_pnl, | ||
avg_returns.avg_28d_pnl_pct * 24 * 365 as apr_28d_pnl, | ||
-- rewards pnls | ||
avg_returns.avg_24h_rewards_pct * 24 * 365 as apr_24h_rewards, | ||
avg_returns.avg_7d_rewards_pct * 24 * 365 as apr_7d_rewards, | ||
avg_returns.avg_28d_rewards_pct * 24 * 365 as apr_28d_rewards | ||
from | ||
pnl_hourly | ||
inner join avg_returns | ||
on | ||
pnl_hourly.ts = avg_returns.ts | ||
and pnl_hourly.pool_id = avg_returns.pool_id | ||
and pnl_hourly.collateral_type = avg_returns.collateral_type | ||
), | ||
|
||
apy_calculations as ( | ||
select | ||
*, | ||
(POWER(1 + apr_24h / 8760, 8760) - 1) as apy_24h, | ||
(POWER(1 + apr_7d / 8760, 8760) - 1) as apy_7d, | ||
(POWER(1 + apr_28d / 8760, 8760) - 1) as apy_28d, | ||
(POWER(1 + apr_24h_pnl / 8760, 8760) - 1) as apy_24h_pnl, | ||
(POWER(1 + apr_7d_pnl / 8760, 8760) - 1) as apy_7d_pnl, | ||
(POWER(1 + apr_28d_pnl / 8760, 8760) - 1) as apy_28d_pnl, | ||
(POWER(1 + apr_24h_rewards / 8760, 8760) - 1) as apy_24h_rewards, | ||
(POWER(1 + apr_7d_rewards / 8760, 8760) - 1) as apy_7d_rewards, | ||
(POWER(1 + apr_28d_rewards / 8760, 8760) - 1) as apy_28d_rewards | ||
from | ||
apr_calculations | ||
) | ||
|
||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
collateral_value, | ||
debt, | ||
hourly_issuance, | ||
hourly_pnl, | ||
cumulative_pnl, | ||
cumulative_issuance, | ||
rewards_usd, | ||
hourly_pnl_pct, | ||
hourly_rewards_pct, | ||
apr_24h, | ||
apy_24h, | ||
apr_7d, | ||
apy_7d, | ||
apr_28d, | ||
apy_28d, | ||
apr_24h_pnl, | ||
apy_24h_pnl, | ||
apr_7d_pnl, | ||
apy_7d_pnl, | ||
apr_28d_pnl, | ||
apy_28d_pnl, | ||
apr_24h_rewards, | ||
apy_24h_rewards, | ||
apr_7d_rewards, | ||
apy_7d_rewards, | ||
apr_28d_rewards, | ||
apy_28d_rewards | ||
from | ||
apy_calculations | ||
order by | ||
ts |
111 changes: 111 additions & 0 deletions
111
...ed/synthetix/models/marts/arbitrum/mainnet/core/fct_core_apr_rewards_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
|
||
|
||
with pnl_hourly as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
reward_token, | ||
collateral_value, | ||
rewards_usd, | ||
hourly_rewards_pct | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_reward_arbitrum_mainnet" | ||
), | ||
|
||
avg_returns as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
reward_token, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type, | ||
reward_token | ||
order by | ||
ts | ||
range between interval '24 HOURS' preceding | ||
and current row | ||
) as avg_24h_rewards_pct, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type, | ||
reward_token | ||
order by | ||
ts | ||
range between interval '7 DAYS' preceding | ||
and current row | ||
) as avg_7d_rewards_pct, | ||
AVG( | ||
hourly_rewards_pct | ||
) over ( | ||
partition by | ||
pool_id, | ||
collateral_type, | ||
reward_token | ||
order by | ||
ts | ||
range between interval '28 DAYS' preceding | ||
and current row | ||
) as avg_28d_rewards_pct | ||
from | ||
pnl_hourly | ||
), | ||
|
||
apr_calculations as ( | ||
select | ||
pnl_hourly.ts, | ||
pnl_hourly.pool_id, | ||
pnl_hourly.collateral_type, | ||
pnl_hourly.reward_token, | ||
pnl_hourly.collateral_value, | ||
pnl_hourly.rewards_usd, | ||
pnl_hourly.hourly_rewards_pct, | ||
avg_returns.avg_24h_rewards_pct * 24 * 365 as apr_24h_rewards, | ||
avg_returns.avg_7d_rewards_pct * 24 * 365 as apr_7d_rewards, | ||
avg_returns.avg_28d_rewards_pct * 24 * 365 as apr_28d_rewards | ||
from | ||
pnl_hourly | ||
inner join avg_returns | ||
on | ||
pnl_hourly.ts = avg_returns.ts | ||
and pnl_hourly.pool_id = avg_returns.pool_id | ||
and pnl_hourly.collateral_type = avg_returns.collateral_type | ||
and pnl_hourly.reward_token = avg_returns.reward_token | ||
), | ||
|
||
apy_calculations as ( | ||
select | ||
*, | ||
(POWER(1 + apr_24h_rewards / 8760, 8760) - 1) as apy_24h_rewards, | ||
(POWER(1 + apr_7d_rewards / 8760, 8760) - 1) as apy_7d_rewards, | ||
(POWER(1 + apr_28d_rewards / 8760, 8760) - 1) as apy_28d_rewards | ||
from | ||
apr_calculations | ||
) | ||
|
||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
reward_token, | ||
collateral_value, | ||
rewards_usd, | ||
hourly_rewards_pct, | ||
apr_24h_rewards, | ||
apy_24h_rewards, | ||
apr_7d_rewards, | ||
apy_7d_rewards, | ||
apr_28d_rewards, | ||
apy_28d_rewards | ||
from | ||
apy_calculations | ||
order by | ||
ts |
36 changes: 36 additions & 0 deletions
36
...synthetix/models/marts/arbitrum/mainnet/core/fct_core_market_updated_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
with market_updated as ( | ||
select | ||
id, | ||
block_timestamp, | ||
block_number, | ||
transaction_hash, | ||
contract, | ||
event_name, | ||
market_id, | ||
net_issuance, | ||
sender, | ||
collateral_type, | ||
credit_capacity, | ||
token_amount | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_market_updated_arbitrum_mainnet" | ||
) | ||
|
||
select | ||
id, | ||
block_timestamp as ts, | ||
transaction_hash, | ||
event_name, | ||
market_id, | ||
collateral_type, | ||
|
||
credit_capacity / 1e18 | ||
as credit_capacity, | ||
|
||
net_issuance / 1e18 | ||
as net_issuance, | ||
|
||
token_amount / 1e18 | ||
as token_amount | ||
from | ||
market_updated |
43 changes: 43 additions & 0 deletions
43
...ynthetix/models/marts/arbitrum/mainnet/core/fct_core_pool_collateral_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
with events as ( | ||
select | ||
block_timestamp, | ||
|
||
token_amount / 1e18 | ||
as token_amount, | ||
collateral_type | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_deposited_arbitrum_mainnet" | ||
union all | ||
select | ||
block_timestamp, | ||
- | ||
token_amount / 1e18 | ||
as token_amount, | ||
collateral_type | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_withdrawn_arbitrum_mainnet" | ||
), | ||
|
||
ranked_events as ( | ||
select | ||
*, | ||
SUM(token_amount) over ( | ||
partition by collateral_type | ||
order by | ||
block_timestamp | ||
rows between unbounded preceding | ||
and current row | ||
) as amount_deposited | ||
from | ||
events | ||
) | ||
|
||
select | ||
block_timestamp as ts, | ||
collateral_type, | ||
amount_deposited | ||
from | ||
ranked_events | ||
order by | ||
block_timestamp, | ||
collateral_type |
49 changes: 49 additions & 0 deletions
49
...ynthetix/models/marts/arbitrum/mainnet/core/fct_core_pool_delegation_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
with delegation_changes as ( | ||
select | ||
block_timestamp, | ||
account_id, | ||
pool_id, | ||
collateral_type, | ||
|
||
amount / 1e18 | ||
|
||
- LAG( | ||
amount / 1e18 | ||
, 1, 0) over ( | ||
partition by | ||
account_id, | ||
pool_id, | ||
collateral_type | ||
order by | ||
block_timestamp | ||
) as change_in_amount | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_delegation_updated_arbitrum_mainnet" | ||
), | ||
|
||
cumulative_delegation as ( | ||
select | ||
block_timestamp, | ||
pool_id, | ||
collateral_type, | ||
SUM(change_in_amount) over ( | ||
partition by | ||
pool_id, | ||
collateral_type | ||
order by | ||
block_timestamp | ||
) as cumulative_amount_delegated | ||
from | ||
delegation_changes | ||
) | ||
|
||
select | ||
block_timestamp as ts, | ||
pool_id, | ||
collateral_type, | ||
cumulative_amount_delegated as amount_delegated | ||
from | ||
cumulative_delegation | ||
order by | ||
block_timestamp, | ||
collateral_type |
13 changes: 13 additions & 0 deletions
13
compiled/synthetix/models/marts/arbitrum/mainnet/core/fct_core_pools_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
with base as ( | ||
select | ||
pool_id as id, | ||
block_timestamp as created_ts, | ||
block_number, | ||
owner | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_pool_created_arbitrum_mainnet" | ||
) | ||
|
||
select * | ||
from | ||
base |
10 changes: 10 additions & 0 deletions
10
compiled/synthetix/models/marts/arbitrum/mainnet/core/fct_pool_debt_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
select | ||
ts, | ||
block_number, | ||
pool_id, | ||
collateral_type, | ||
debt | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_vault_debt_arbitrum_mainnet" | ||
order by | ||
ts |
43 changes: 43 additions & 0 deletions
43
compiled/synthetix/models/marts/arbitrum/mainnet/core/fct_pool_issuance_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
with burns as ( | ||
select | ||
block_timestamp as ts, | ||
block_number, | ||
transaction_hash, | ||
pool_id, | ||
collateral_type, | ||
account_id, | ||
-1 * | ||
amount / 1e18 | ||
as amount | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_usd_burned_arbitrum_mainnet" | ||
order by | ||
block_timestamp desc | ||
), | ||
|
||
mints as ( | ||
select | ||
block_timestamp as ts, | ||
block_number, | ||
transaction_hash, | ||
pool_id, | ||
collateral_type, | ||
account_id, | ||
|
||
amount / 1e18 | ||
as amount | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_usd_minted_arbitrum_mainnet" | ||
order by | ||
block_timestamp desc | ||
) | ||
|
||
select * | ||
from | ||
burns | ||
union all | ||
select * | ||
from | ||
mints | ||
order by | ||
ts desc |
122 changes: 122 additions & 0 deletions
122
...ynthetix/models/marts/arbitrum/mainnet/core/fct_pool_issuance_hourly_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
with dim as ( | ||
select | ||
m.pool_id, | ||
m.collateral_type, | ||
generate_series( | ||
date_trunc('hour', min(t.ts)), | ||
date_trunc('hour', max(t.ts)), | ||
'1 hour'::interval | ||
) as ts | ||
from | ||
( | ||
select ts | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
) as t | ||
cross join ( | ||
select distinct | ||
pool_id, | ||
collateral_type | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
) as m | ||
group by | ||
m.pool_id, | ||
m.collateral_type | ||
), | ||
|
||
max_debt_block as ( | ||
select | ||
pool_id, | ||
collateral_type, | ||
date_trunc( | ||
'hour', | ||
ts | ||
) as "hour", | ||
max(block_number) as max_block_number | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
group by | ||
date_trunc( | ||
'hour', | ||
ts | ||
), | ||
pool_id, | ||
collateral_type | ||
), | ||
|
||
filt_issuance as ( | ||
select | ||
i.pool_id, | ||
i.collateral_type, | ||
i.amount, | ||
case | ||
when | ||
i.block_number <= d.max_block_number | ||
or d.max_block_number is null then i.ts | ||
else i.ts + interval '1 hour' | ||
end as ts | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
as i | ||
left join max_debt_block as d | ||
on date_trunc( | ||
'hour', | ||
i.ts | ||
) = d.hour | ||
and i.pool_id = d.pool_id | ||
and lower( | ||
i.collateral_type | ||
) = lower( | ||
d.collateral_type | ||
) | ||
where | ||
i.block_number <= ( | ||
select | ||
max( | ||
max_block_number | ||
) as b | ||
from | ||
max_debt_block | ||
) | ||
), | ||
|
||
issuance as ( | ||
select | ||
date_trunc( | ||
'hour', | ||
ts | ||
) as ts, | ||
pool_id, | ||
collateral_type, | ||
sum(amount) as hourly_issuance | ||
from | ||
filt_issuance | ||
group by | ||
date_trunc( | ||
'hour', | ||
ts | ||
), | ||
pool_id, | ||
collateral_type | ||
) | ||
|
||
select | ||
dim.ts, | ||
dim.pool_id, | ||
dim.collateral_type, | ||
coalesce( | ||
i.hourly_issuance, | ||
0 | ||
) as hourly_issuance | ||
from | ||
dim | ||
left join issuance as i | ||
on | ||
dim.pool_id = i.pool_id | ||
and lower( | ||
dim.collateral_type | ||
) = lower( | ||
i.collateral_type | ||
) | ||
and dim.ts = i.ts |
214 changes: 214 additions & 0 deletions
214
...led/synthetix/models/marts/arbitrum/mainnet/core/fct_pool_pnl_hourly_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
|
||
|
||
with dim as ( | ||
select | ||
p.pool_id, | ||
p.collateral_type, | ||
generate_series( | ||
date_trunc('hour', min(t.ts)), | ||
date_trunc('hour', max(t.ts)), | ||
'1 hour'::INTERVAL | ||
) as ts | ||
from | ||
( | ||
select ts | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
) as t | ||
cross join ( | ||
select distinct | ||
pool_id, | ||
collateral_type | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
) as p | ||
group by | ||
p.pool_id, | ||
p.collateral_type | ||
), | ||
|
||
issuance as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
hourly_issuance | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
), | ||
|
||
debt as ( | ||
select distinct | ||
pool_id, | ||
collateral_type, | ||
date_trunc( | ||
'hour', | ||
ts | ||
) as ts, | ||
last_value(debt) over ( | ||
partition by date_trunc('hour', ts), pool_id, collateral_type | ||
order by | ||
ts | ||
rows between unbounded preceding | ||
and unbounded following | ||
) as debt | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
), | ||
|
||
collateral as ( | ||
select distinct | ||
pool_id, | ||
collateral_type, | ||
date_trunc( | ||
'hour', | ||
ts | ||
) as ts, | ||
last_value(collateral_value) over ( | ||
partition by date_trunc('hour', ts), pool_id, collateral_type | ||
order by | ||
ts | ||
rows between unbounded preceding | ||
and unbounded following | ||
) as collateral_value | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_vault_collateral_arbitrum_mainnet" | ||
where | ||
pool_id = 1 | ||
), | ||
|
||
ffill as ( | ||
select | ||
dim.ts, | ||
dim.pool_id, | ||
dim.collateral_type, | ||
coalesce( | ||
last(debt) over ( | ||
partition by dim.collateral_type, dim.pool_id | ||
order by dim.ts | ||
rows between unbounded preceding and current row | ||
), | ||
0 | ||
) as debt, | ||
coalesce( | ||
last(collateral_value) over ( | ||
partition by dim.collateral_type, dim.pool_id | ||
order by dim.ts | ||
rows between unbounded preceding and current row | ||
), | ||
0 | ||
) as collateral_value | ||
from | ||
dim | ||
left join debt | ||
on | ||
dim.ts = debt.ts | ||
and dim.pool_id = debt.pool_id | ||
and dim.collateral_type = debt.collateral_type | ||
left join collateral | ||
on | ||
dim.ts = collateral.ts | ||
and dim.pool_id = collateral.pool_id | ||
and dim.collateral_type = collateral.collateral_type | ||
), | ||
|
||
hourly_pnl as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
collateral_value, | ||
debt, | ||
coalesce(lag(debt) over ( | ||
partition by pool_id, collateral_type | ||
order by | ||
ts | ||
) - debt, 0) as hourly_pnl | ||
from | ||
ffill | ||
), | ||
|
||
hourly_rewards as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
rewards_usd | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
), | ||
|
||
hourly_returns as ( | ||
select | ||
pnl.ts, | ||
pnl.pool_id, | ||
pnl.collateral_type, | ||
pnl.collateral_value, | ||
pnl.debt, | ||
coalesce( | ||
iss.hourly_issuance, | ||
0 | ||
) as hourly_issuance, | ||
pnl.hourly_pnl + coalesce( | ||
iss.hourly_issuance, | ||
0 | ||
) as hourly_pnl, | ||
coalesce( | ||
rewards.rewards_usd, | ||
0 | ||
) as rewards_usd, | ||
case | ||
when pnl.collateral_value = 0 then 0 | ||
else coalesce( | ||
rewards.rewards_usd, | ||
0 | ||
) / pnl.collateral_value | ||
end as hourly_rewards_pct, | ||
case | ||
when pnl.collateral_value = 0 then 0 | ||
else | ||
(coalesce(iss.hourly_issuance, 0) + pnl.hourly_pnl) | ||
/ pnl.collateral_value | ||
end as hourly_pnl_pct, | ||
case | ||
when pnl.collateral_value = 0 then 0 | ||
else | ||
( | ||
coalesce(rewards.rewards_usd, 0) | ||
+ pnl.hourly_pnl | ||
+ coalesce(iss.hourly_issuance, 0) | ||
) | ||
/ pnl.collateral_value | ||
end as hourly_total_pct | ||
from | ||
hourly_pnl as pnl | ||
left join hourly_rewards as rewards | ||
on | ||
pnl.ts = rewards.ts | ||
and pnl.pool_id = rewards.pool_id | ||
and lower(pnl.collateral_type) = lower(rewards.collateral_type) | ||
left join issuance as iss | ||
on | ||
pnl.ts = iss.ts | ||
and pnl.pool_id = iss.pool_id | ||
and lower( | ||
pnl.collateral_type | ||
) = lower( | ||
iss.collateral_type | ||
) | ||
) | ||
|
||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
collateral_value, | ||
debt, | ||
hourly_issuance, | ||
hourly_pnl, | ||
rewards_usd, | ||
hourly_pnl_pct, | ||
hourly_rewards_pct, | ||
hourly_total_pct | ||
from | ||
hourly_returns |
82 changes: 82 additions & 0 deletions
82
...thetix/models/marts/arbitrum/mainnet/core/fct_pool_pnl_hourly_reward_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
|
||
with dim as ( | ||
|
||
select | ||
t.ts, | ||
t.pool_id, | ||
t.collateral_type, | ||
t.collateral_value, | ||
p.token_symbol as reward_token | ||
from | ||
( | ||
select | ||
ts, | ||
collateral_type, | ||
pool_id, | ||
collateral_value | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
group by | ||
ts, | ||
collateral_type, | ||
pool_id, | ||
collateral_value | ||
) as t | ||
cross join ( | ||
select distinct token_symbol | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
) as p | ||
group by | ||
t.ts, | ||
t.pool_id, | ||
t.collateral_type, | ||
t.collateral_value, | ||
p.token_symbol | ||
), | ||
|
||
reward_hourly_token as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
token_symbol as reward_token, | ||
SUM( | ||
rewards_usd | ||
) as rewards_usd | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
group by | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
token_symbol | ||
) | ||
|
||
select | ||
dim.ts, | ||
dim.pool_id, | ||
dim.collateral_type, | ||
dim.collateral_value, | ||
dim.reward_token, | ||
COALESCE( | ||
reward_hourly_token.rewards_usd, | ||
0 | ||
) as rewards_usd, | ||
case | ||
when dim.collateral_value = 0 then 0 | ||
else COALESCE( | ||
reward_hourly_token.rewards_usd, | ||
0 | ||
) / dim.collateral_value | ||
end as hourly_rewards_pct | ||
from | ||
dim | ||
left join reward_hourly_token | ||
on | ||
dim.ts = reward_hourly_token.ts | ||
and dim.pool_id = reward_hourly_token.pool_id | ||
and LOWER(dim.collateral_type) | ||
= LOWER(reward_hourly_token.collateral_type) | ||
and dim.reward_token = reward_hourly_token.reward_token |
39 changes: 39 additions & 0 deletions
39
compiled/synthetix/models/marts/arbitrum/mainnet/core/fct_pool_rewards_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
with rewards_distributed as ( | ||
select | ||
block_timestamp as ts, | ||
CAST( | ||
pool_id as INTEGER | ||
) as pool_id, | ||
collateral_type, | ||
distributor, | ||
|
||
amount / 1e18 | ||
as amount, | ||
TO_TIMESTAMP("start") as ts_start, | ||
"duration" | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_rewards_distributed_arbitrum_mainnet" | ||
), | ||
|
||
distributors as ( | ||
select | ||
CAST(distributor_address as TEXT) as distributor_address, | ||
CAST(token_symbol as TEXT) as token_symbol | ||
from | ||
"analytics"."prod_seeds"."arbitrum_mainnet_reward_distributors" | ||
) | ||
|
||
select | ||
rd.ts, | ||
rd.pool_id, | ||
rd.collateral_type, | ||
rd.distributor, | ||
distributors.token_symbol, | ||
rd.amount, | ||
rd.ts_start, | ||
rd.duration | ||
from | ||
rewards_distributed as rd | ||
inner join distributors on rd.distributor = distributors.distributor_address | ||
order by | ||
rd.ts |
21 changes: 21 additions & 0 deletions
21
...synthetix/models/marts/arbitrum/mainnet/core/fct_pool_rewards_hourly_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
with token_hourly as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
rewards_usd | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
) | ||
|
||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
SUM(rewards_usd) as rewards_usd | ||
from | ||
token_hourly | ||
group by | ||
ts, | ||
pool_id, | ||
collateral_type |
190 changes: 190 additions & 0 deletions
190
...tix/models/marts/arbitrum/mainnet/core/fct_pool_rewards_token_hourly_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
with dim as ( | ||
select | ||
m.pool_id, | ||
m.collateral_type, | ||
generate_series( | ||
date_trunc('hour', min(t.min_ts)), | ||
date_trunc('hour', max(t.max_ts)), | ||
'1 hour'::INTERVAL | ||
) as ts | ||
from | ||
( | ||
select | ||
min(ts_start) as min_ts, | ||
max( | ||
ts_start + "duration" * '1 second'::INTERVAL | ||
) as max_ts | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
) as t | ||
cross join ( | ||
select distinct | ||
pool_id, | ||
collateral_type | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
) as m | ||
group by | ||
m.pool_id, | ||
m.collateral_type | ||
), | ||
|
||
rewards_distributed as ( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol, | ||
amount, | ||
ts_start, | ||
"duration" | ||
from | ||
"analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
), | ||
|
||
hourly_distributions as ( | ||
select | ||
dim.ts, | ||
dim.pool_id, | ||
dim.collateral_type, | ||
r.distributor, | ||
r.token_symbol, | ||
r.amount, | ||
r.ts_start, | ||
r."duration", | ||
row_number() over ( | ||
partition by | ||
dim.ts, | ||
dim.pool_id, | ||
dim.collateral_type, | ||
r.distributor | ||
order by | ||
r.ts_start desc | ||
) as distributor_index | ||
from | ||
dim | ||
left join rewards_distributed as r | ||
on | ||
dim.pool_id = r.pool_id | ||
and lower( | ||
dim.collateral_type | ||
) = lower( | ||
r.collateral_type | ||
) | ||
and dim.ts + '1 hour'::INTERVAL >= r.ts_start | ||
and dim.ts < r.ts_start + r."duration" * '1 second'::INTERVAL | ||
where | ||
r."duration" > 0 | ||
), | ||
|
||
streamed_rewards as ( | ||
select | ||
d.ts, | ||
d.pool_id, | ||
d.collateral_type, | ||
d.distributor, | ||
d.token_symbol, | ||
-- get the amount of time distributed this hour | ||
-- use the smaller of those two intervals | ||
-- convert the interval to a number of hours | ||
-- multiply the result by the hourly amount to get the amount distributed this hour | ||
( | ||
extract( | ||
epoch | ||
from | ||
least( | ||
d."duration" / 3600 * '1 hour'::INTERVAL, | ||
least( | ||
d.ts + '1 hour'::INTERVAL - greatest( | ||
d.ts, | ||
d.ts_start | ||
), | ||
least( | ||
d.ts_start + d."duration" * '1 second'::INTERVAL, | ||
d.ts + '1 hour'::INTERVAL | ||
) - d.ts | ||
) | ||
) | ||
) / 3600 | ||
) * d.amount / ( | ||
d."duration" / 3600 | ||
) as amount | ||
from | ||
hourly_distributions as d | ||
where | ||
d.distributor_index = 1 | ||
), | ||
|
||
instant_rewards as ( | ||
select | ||
date_trunc( | ||
'hour', | ||
ts | ||
) as ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol, | ||
amount | ||
from | ||
rewards_distributed | ||
where | ||
"duration" = 0 | ||
), | ||
|
||
combined as ( | ||
select | ||
combo.ts, | ||
combo.pool_id, | ||
combo.collateral_type, | ||
combo.distributor, | ||
combo.token_symbol, | ||
combo.amount, | ||
p.price | ||
from | ||
( | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol, | ||
amount | ||
from | ||
streamed_rewards | ||
union all | ||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol, | ||
amount | ||
from | ||
instant_rewards | ||
) as combo | ||
left join "analytics"."prod_arbitrum_mainnet"."fct_prices_hourly_arbitrum_mainnet" as p | ||
on | ||
combo.token_symbol = p.market_symbol | ||
and combo.ts = p.ts | ||
) | ||
|
||
select | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol, | ||
sum(amount) as amount, | ||
sum( | ||
amount * price | ||
) as rewards_usd | ||
from | ||
combined | ||
group by | ||
ts, | ||
pool_id, | ||
collateral_type, | ||
distributor, | ||
token_symbol |
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/accepted_values_fct_core_accou_eae8ff947e1ce9ebc1fc373bb06c20b9.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
|
||
|
||
with all_values as ( | ||
|
||
select | ||
account_action as value_field, | ||
count(*) as n_records | ||
|
||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_activity_arbitrum_mainnet" | ||
group by account_action | ||
|
||
) | ||
|
||
select * | ||
from all_values | ||
where value_field not in ( | ||
'Delegated','Withdrawn','Claimed' | ||
) | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/accepted_values_fct_core_marke_f12327e7950a4c802d6132d27f7841dd.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
|
||
|
||
with all_values as ( | ||
|
||
select | ||
event_name as value_field, | ||
count(*) as n_records | ||
|
||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
group by event_name | ||
|
||
) | ||
|
||
select * | ||
from all_values | ||
where value_field not in ( | ||
'MarketCollateralWithdrawn','MarketCollateralDeposited','MarketUsdWithdrawn','MarketUsdDeposited' | ||
) | ||
|
||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_1755c42adad4400728f2d291f52662f0.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_335aca0e4bfdf700395d4d6e2861f70c.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_483fd77f9e18a06eeee91a8e4f95404a.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_rewards_pct >= 0 | ||
-- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_rewards_pct <= 1 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_73ef4a8208eaef7723f7a2b1da192431.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_pnl_pct >= -1 | ||
-- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_pnl_pct <= 1 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_7c412ba7c7ea7aef5e4e7db7c8fc5c75.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_delegation_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_85aa93ec24a82fd6c67a87038bee45c1.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not rewards_usd >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_ab6508955d3f808c1b270f9aa7a37b6d.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not market_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_b1d60fed4955a4fc968b2378103deac3.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pools_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_ebc9de3d45a12d255533021f88b74fed.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not amount_delegated >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_c_f5658474e91a7efeefc846ada0723656.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not collateral_value >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_0b54f6ee81adfb64e5d45509be471536.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_1f912620bb744a27954a74cab0fd1f0c.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_2a92d0cd280c3cfef0baf61899429708.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_2b0953c6036f08e2a591283eb5a67dcb.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_rewards_pct >= 0 | ||
-- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_rewards_pct <= 1 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_60522e151e8e0e30d7da9ec6cf7c9bd3.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_75eb21ed4adc24b56bbcdcebefd76286.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not collateral_value >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_763a1d68cea27da2cd6c7c90b0572cee.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not amount >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_808e4ad8c54952685268224b3ab2dc3f.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_92e486da67fd4aa212c6fc7ead2ca990.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_ae8a634b24663cbeedd8622d73436da5.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not pool_id >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_b1d59884f8642fc3181a3d46417cd8fb.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not amount >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_b767823a1421432f769ec197446aa019.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not rewards_usd >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
22 changes: 22 additions & 0 deletions
22
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_d399039b72aeb6695a12d8e3bbc21cc7.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_pnl_pct >= -1 | ||
-- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not hourly_pnl_pct <= 1 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_df233af1f002dedfa1f71072df17c949.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not rewards_usd >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
20 changes: 20 additions & 0 deletions
20
...innet/core/schema.yml/dbt_utils_accepted_range_fct_p_fc2ea70c19f61eac92d253c82f8b6c86.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
with meet_condition as( | ||
select * | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
), | ||
|
||
validation_errors as ( | ||
select * | ||
from meet_condition | ||
where | ||
-- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds | ||
1 = 2 | ||
-- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule. | ||
or not rewards_usd >= 0 | ||
) | ||
|
||
select * | ||
from validation_errors | ||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_account_acti_110729d808f19de3565eb2af6e4f1379.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select account_action | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_activity_arbitrum_mainnet" | ||
where account_action is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_account_acti_806bcc17b9b1e4e50ba5db20a6a3dead.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select block_timestamp | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_activity_arbitrum_mainnet" | ||
where block_timestamp is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_core_account_activity_arbitrum_mainnet_account_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select account_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_activity_arbitrum_mainnet" | ||
where account_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_account_dele_31ff6ba6e6f978d07dd28e8ba6100164.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_account_dele_97b2ee4148e5bac1b0699fe3c6e63583.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select account_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
where account_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_account_dele_ee7cc0e1e999bee8d31dc50dc12bd488.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select amount_delegated | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
where amount_delegated is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...mainnet/core/schema.yml/not_null_fct_core_account_delegation_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...trum/mainnet/core/schema.yml/not_null_fct_core_account_delegation_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_account_delegation_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_active_stake_7d7a3bea29f881165e460d221525b622.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select block_date | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_active_stakers_daily_arbitrum_mainnet" | ||
where block_date is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apr_24h.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apr_24h | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apr_24h is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apr_28d.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apr_28d | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apr_28d is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apr_7d.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apr_7d | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apr_7d is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apy_24h.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apy_24h | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apy_24h is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apy_28d.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apy_28d | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apy_28d is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_apy_7d.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select apy_7d | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where apy_7d is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...bitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_collateral_type.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...itrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_collateral_value.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_value | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where collateral_value is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...um/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_cumulative_issuance.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select cumulative_issuance | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where cumulative_issuance is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_cumulative_pnl.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select cumulative_pnl | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where cumulative_pnl is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ls/marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_debt.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select debt | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where debt is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...bitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_hourly_issuance.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_issuance | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where hourly_issuance is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_hourly_pnl.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_pnl | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where hourly_pnl is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_hourly_pnl_pct.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_pnl_pct | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where hourly_pnl_pct is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_hourly_rewards_pct.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_rewards_pct | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where hourly_rewards_pct is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...s/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_rewards_usd.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select rewards_usd | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where rewards_usd is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...dels/marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_apr_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_apr_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_market_updat_4b643cda1c91c522d066b35480cce379.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select transaction_hash | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where transaction_hash is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_market_updat_c100fcf44108d7ff35d65b9c6a7b25b1.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_market_updat_ec83a69c2d67a6b85fde509d3cc884a8.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select credit_capacity | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where credit_capacity is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../mainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_event_name.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select event_name | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where event_name is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...arbitrum/mainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...m/mainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_market_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select market_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where market_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_net_issuance.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select net_issuance | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where net_issuance is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_token_amount.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select token_amount | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where token_amount is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...arbitrum/mainnet/core/schema.yml/not_null_fct_core_market_updated_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_pool_collate_093527c47d269f939c2c7d47d4c2a78f.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_collateral_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_pool_collate_2430c0471eac1e889c6c004ff9132c39.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select amount_deposited | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_collateral_arbitrum_mainnet" | ||
where amount_deposited is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_core_pool_collateral_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_collateral_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_core_pool_delegat_b4282e52ccccdfed1d4b4c2355b7d655.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_delegation_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...um/mainnet/core/schema.yml/not_null_fct_core_pool_delegation_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_delegation_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_core_pool_delegation_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pool_delegation_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_core_pools_arbitrum_mainnet_block_number.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select block_number | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pools_arbitrum_mainnet" | ||
where block_number is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../arbitrum/mainnet/core/schema.yml/not_null_fct_core_pools_arbitrum_mainnet_created_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select created_ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pools_arbitrum_mainnet" | ||
where created_ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ls/marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_pools_arbitrum_mainnet_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pools_arbitrum_mainnet" | ||
where id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_core_pools_arbitrum_mainnet_owner.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select owner | ||
from "analytics"."prod_arbitrum_mainnet"."fct_core_pools_arbitrum_mainnet" | ||
where owner is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...arbitrum/mainnet/core/schema.yml/not_null_fct_pool_debt_arbitrum_mainnet_block_number.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select block_number | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
where block_number is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...itrum/mainnet/core/schema.yml/not_null_fct_pool_debt_arbitrum_mainnet_collateral_type.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...s/marts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_debt_arbitrum_mainnet_debt.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select debt | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
where debt is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...arts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_debt_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...els/marts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_debt_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_debt_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...bitrum/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_account_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select account_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where account_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...s/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_amount.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select amount | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where amount is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...trum/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_block_number.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select block_number | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where block_number is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...m/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_collateral_type.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../arbitrum/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_transaction_hash.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select transaction_hash | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where transaction_hash is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...marts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_issuance_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_issuance_hou_65ed67157b891a8810704ee505558860.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_issuance_hou_6846fca20e0573c8b636234f11940a78.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_issuance | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
where hourly_issuance is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...um/mainnet/core/schema.yml/not_null_fct_pool_issuance_hourly_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_pool_issuance_hourly_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_issuance_hourly_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_pnl_hourly_a_7c866040c874169c1cad2287083652b9.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_rewards_pct | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where hourly_rewards_pct is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_collateral_type.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_collateral_value.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_value | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where collateral_value is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...s/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_debt.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select debt | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where debt is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_hourly_issuance.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_issuance | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where hourly_issuance is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...trum/mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_hourly_pnl.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_pnl | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where hourly_pnl is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_hourly_pnl_pct.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_pnl_pct | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where hourly_pnl_pct is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_hourly_total_pct.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select hourly_total_pct | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where hourly_total_pct is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rbitrum/mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rum/mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_rewards_usd.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select rewards_usd | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where rewards_usd is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_pnl_hourly_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_pnl_hourly_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_amount.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select amount | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where amount is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...um/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_collateral_type.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...bitrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_distributor.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select distributor | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where distributor is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...s/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...itrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_token_symbol.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select token_symbol | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where token_symbol is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
.../marts/arbitrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_hour_6b64ee93647e66468d764cc3fc458ee1.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...rum/mainnet/core/schema.yml/not_null_fct_pool_rewards_hourly_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...mainnet/core/schema.yml/not_null_fct_pool_rewards_hourly_arbitrum_mainnet_rewards_usd.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select rewards_usd | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
where rewards_usd is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...arbitrum/mainnet/core/schema.yml/not_null_fct_pool_rewards_hourly_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_hourly_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_toke_090c93d2b78f3f33bc0bf584324abc24.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select token_symbol | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where token_symbol is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_toke_155765ddde142e379951332067798d41.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select collateral_type | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where collateral_type is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_toke_32d66eb63ddb1fa4ad4488d0be44060a.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select distributor | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where distributor is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_toke_e5018762223ef54a23a1f8e8015d80e9.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select rewards_usd | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where rewards_usd is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...ainnet/core/schema.yml/not_null_fct_pool_rewards_token_hourly_arbitrum_mainnet_amount.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select amount | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where amount is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...innet/core/schema.yml/not_null_fct_pool_rewards_token_hourly_arbitrum_mainnet_pool_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select pool_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where pool_id is null | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...um/mainnet/core/schema.yml/not_null_fct_pool_rewards_token_hourly_arbitrum_mainnet_ts.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
select ts | ||
from "analytics"."prod_arbitrum_mainnet"."fct_pool_rewards_token_hourly_arbitrum_mainnet" | ||
where ts is null | ||
|
||
|
14 changes: 14 additions & 0 deletions
14
...s/arbitrum/mainnet/core/schema.yml/unique_fct_core_market_updated_arbitrum_mainnet_id.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
|
||
|
||
|
||
select | ||
id as unique_field, | ||
count(*) as n_records | ||
|
||
from "analytics"."prod_arbitrum_mainnet"."fct_core_market_updated_arbitrum_mainnet" | ||
where id is not null | ||
group by id | ||
having count(*) > 1 | ||
|
||
|
86 changes: 86 additions & 0 deletions
86
...nthetix/models/marts/arbitrum/mainnet/perp/fct_perp_account_activity_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
|
||
|
||
with active_accounts as ( | ||
select distinct | ||
date_trunc('day', ts) as activity_date, | ||
account_id | ||
from "analytics"."prod_arbitrum_mainnet"."fct_perp_trades_arbitrum_mainnet" | ||
), | ||
|
||
date_range as ( | ||
select | ||
generate_series( | ||
date(min(activity_date)), | ||
date(max(activity_date)), | ||
interval '1 day' | ||
)::date as activity_date | ||
from active_accounts | ||
), | ||
|
||
active_accounts_daily as ( | ||
select | ||
date_range.activity_date, | ||
count(distinct active_accounts.account_id) as active_accounts | ||
from date_range | ||
left join active_accounts | ||
on date_range.activity_date = active_accounts.activity_date | ||
group by date_range.activity_date | ||
), | ||
|
||
active_accounts_monthly as ( | ||
select | ||
date_range.activity_date, | ||
count(distinct active_accounts.account_id) as active_accounts | ||
from date_range | ||
left join active_accounts | ||
on | ||
date_range.activity_date - interval '27 days' | ||
<= active_accounts.activity_date | ||
and date_range.activity_date >= active_accounts.activity_date | ||
group by date_range.activity_date | ||
), | ||
|
||
new_accounts as ( | ||
select | ||
min(activity_date) as start_date, | ||
account_id | ||
from active_accounts | ||
group by account_id | ||
), | ||
|
||
new_accounts_daily as ( | ||
select | ||
date_range.activity_date, | ||
count(new_accounts.account_id) as new_accounts | ||
from date_range | ||
left join new_accounts | ||
on date_range.activity_date = new_accounts.start_date | ||
group by date_range.activity_date, new_accounts.start_date | ||
), | ||
|
||
new_accounts_monthly as ( | ||
select distinct | ||
activity_date, | ||
sum(new_accounts) over ( | ||
order by activity_date | ||
range between interval '27 days' preceding and current row | ||
) as new_accounts | ||
from new_accounts_daily | ||
) | ||
|
||
select | ||
dr.activity_date as ts, | ||
dau.active_accounts as dau, | ||
mau.active_accounts as mau, | ||
new_accounts_daily.new_accounts as new_accounts_daily, | ||
new_accounts_monthly.new_accounts as new_accounts_monthly | ||
from date_range as dr | ||
left join active_accounts_daily as dau | ||
on dr.activity_date = dau.activity_date | ||
left join active_accounts_monthly as mau | ||
on dr.activity_date = mau.activity_date | ||
left join new_accounts_daily | ||
on dr.activity_date = new_accounts_daily.activity_date | ||
left join new_accounts_monthly | ||
on dr.activity_date = new_accounts_monthly.activity_date | ||
order by ts desc |
14 changes: 14 additions & 0 deletions
14
compiled/synthetix/models/marts/arbitrum/mainnet/perp/fct_perp_accounts_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
with arbitrum as ( | ||
select | ||
block_timestamp as created_ts, | ||
"owner", | ||
CAST( | ||
account_id as VARCHAR | ||
) as id | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."perp_account_created_arbitrum_mainnet" | ||
) | ||
|
||
select * | ||
from | ||
arbitrum |
131 changes: 131 additions & 0 deletions
131
...etix/models/marts/arbitrum/mainnet/perp/fct_perp_collateral_balances_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
with synths as ( | ||
select | ||
synth_market_id as collateral_id, | ||
synth_token_address | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."spot_synth_registered_arbitrum_mainnet" | ||
), | ||
|
||
transfers as ( | ||
select | ||
cm.block_number, | ||
cm.block_timestamp as ts, | ||
cm.transaction_hash, | ||
cm.collateral_id, | ||
synths.synth_token_address, | ||
CAST(cm.account_id as text) as account_id, | ||
|
||
cm.amount_delta / 1e18 | ||
as amount_delta | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."perp_collateral_modified_arbitrum_mainnet" as cm | ||
inner join synths | ||
on cm.collateral_id = synths.collateral_id | ||
), | ||
|
||
liq_tx as ( | ||
select distinct | ||
transaction_hash, | ||
CAST(account_id as text) as account_id | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."perp_account_liquidation_attempt_arbitrum_mainnet" | ||
), | ||
|
||
distributors as ( | ||
select | ||
CAST(rd.distributor_address as text) as distributor_address, | ||
CAST(rd.token_symbol as text) as token_symbol, | ||
rd.synth_token_address, | ||
synths.collateral_id | ||
from | ||
"analytics"."prod_seeds"."arbitrum_mainnet_reward_distributors" as rd | ||
inner join synths | ||
on rd.synth_token_address = synths.synth_token_address | ||
), | ||
|
||
liquidations as ( | ||
select | ||
rd.block_number, | ||
rd.block_timestamp as ts, | ||
-rd.amount / 1e18 as amount_delta, | ||
liq_tx.transaction_hash, | ||
rd.collateral_type, | ||
distributors.token_symbol, | ||
distributors.synth_token_address, | ||
CAST(liq_tx.account_id as text) as account_id, | ||
distributors.collateral_id | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."core_rewards_distributed_arbitrum_mainnet" as rd | ||
inner join liq_tx | ||
on rd.transaction_hash = liq_tx.transaction_hash | ||
inner join distributors | ||
on rd.distributor = distributors.distributor_address | ||
), | ||
|
||
net_transfers as ( | ||
select | ||
events.ts, | ||
events.transaction_hash, | ||
events.event_type, | ||
events.collateral_id, | ||
events.synth_token_address, | ||
synths.synth_symbol, | ||
events.account_id, | ||
prices.price, | ||
events.amount_delta, | ||
SUM(events.amount_delta) over ( | ||
partition by events.account_id, events.collateral_id | ||
order by events.ts | ||
) as account_balance, | ||
SUM(events.amount_delta) over ( | ||
partition by events.collateral_id | ||
order by events.ts | ||
) as total_balance | ||
from ( | ||
select | ||
transfers.ts, | ||
transfers.transaction_hash, | ||
transfers.collateral_id, | ||
transfers.synth_token_address, | ||
transfers.account_id, | ||
transfers.amount_delta, | ||
'transfer' as event_type | ||
from | ||
transfers | ||
union all | ||
select | ||
liquidations.ts, | ||
liquidations.transaction_hash, | ||
liquidations.collateral_id, | ||
liquidations.synth_token_address, | ||
liquidations.account_id, | ||
liquidations.amount_delta, | ||
'liquidation' as event_type | ||
from | ||
liquidations | ||
) as events | ||
inner join "analytics"."prod_seeds"."arbitrum_mainnet_synths" as synths | ||
on events.collateral_id = synths.synth_market_id | ||
left join "analytics"."prod_arbitrum_mainnet"."fct_prices_hourly_arbitrum_mainnet" as prices | ||
on | ||
synths.token_symbol = prices.market_symbol | ||
and DATE_TRUNC('hour', events.ts) = prices.ts | ||
) | ||
|
||
select | ||
net_transfers.ts, | ||
net_transfers.transaction_hash, | ||
net_transfers.event_type, | ||
net_transfers.collateral_id, | ||
net_transfers.synth_token_address, | ||
net_transfers.synth_symbol, | ||
net_transfers.account_id, | ||
net_transfers.price, | ||
net_transfers.amount_delta, | ||
net_transfers.amount_delta * net_transfers.price as amount_delta_usd, | ||
net_transfers.account_balance, | ||
net_transfers.account_balance * net_transfers.price as account_balance_usd, | ||
net_transfers.total_balance, | ||
net_transfers.total_balance * net_transfers.price as total_balance_usd | ||
from | ||
net_transfers |
20 changes: 20 additions & 0 deletions
20
...etix/models/marts/arbitrum/mainnet/perp/fct_perp_collateral_modified_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
select | ||
cm.id, | ||
cm.block_timestamp, | ||
cm.account_id, | ||
cm.block_number, | ||
cm.transaction_hash, | ||
cm.contract, | ||
cm.event_name, | ||
synths.synth_symbol, | ||
cm.collateral_id as synth_market_id, | ||
synths.synth_token_address, | ||
cm.sender, | ||
|
||
cm.amount_delta / 1e18 | ||
as amount_delta | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."perp_collateral_modified_arbitrum_mainnet" | ||
as cm | ||
inner join "analytics"."prod_seeds"."arbitrum_mainnet_synths" as synths | ||
on cm.collateral_id = synths.synth_market_id |
13 changes: 13 additions & 0 deletions
13
...nthetix/models/marts/arbitrum/mainnet/perp/fct_perp_interest_charged_arbitrum_mainnet.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
select | ||
id, | ||
block_timestamp, | ||
block_number, | ||
transaction_hash, | ||
contract, | ||
event_name, | ||
account_id, | ||
|
||
interest / 1e18 | ||
as interest | ||
from | ||
"analytics"."prod_raw_arbitrum_mainnet"."perp_interest_charged_arbitrum_mainnet" |
Oops, something went wrong.