rajsTrue Freeze Stats
Updated 2023-03-26Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with withdrawals as
(
SELECT
coalesce(sum(withdrawn_weth_amount),0) as withdrawn_weth_amount,
count(*) as no_of_withdrawals,
count(distinct origin_from_address) as no_of_withdrawers,
coalesce(sum(case when weth_penalty > 0 then 1 end),0) as no_of_early_withdrawals,
coalesce(sum(case when weth_penalty > 0 then withdrawn_weth_amount end),0) as early_withdrawn_weth_amount,
count(distinct case when weth_penalty > 0 then origin_from_address end) as no_of_early_withdrawers,
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '30 days' then withdrawn_weth_amount END),0) as "30_days_withdrawn_weth_amount",
count(case when block_timestamp >= CURRENT_DATE - interval '30 days' then 1 end) as "30_daysno_of_withdrawals",
count(distinct case when block_timestamp >= CURRENT_DATE - interval '30 days' then origin_from_address end) as "30_days_no_of_withdrawers",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then 1 end),0) as "30_days_no_of_early_withdrawals",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then withdrawn_weth_amount end),0) as "30_days_early_withdrawn_weth_amount",
count(distinct case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then origin_from_address end) as "30_days_no_of_early_withdrawers",
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '7 days' then withdrawn_weth_amount END),0) as "7_days_withdrawn_weth_amount",
count(case when block_timestamp >= CURRENT_DATE - interval '7 days' then 1 end) as "7_days_no_of_withdrawals",
count(distinct case when block_timestamp >= CURRENT_DATE - interval '7 days' then origin_from_address end) as "7_days_no_of_withdrawers",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then 1 end),0) as "7_days_no_of_early_withdrawals",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then withdrawn_weth_amount end),0) as "7_days_early_withdrawn_weth_amount",
count(distinct case when weth_penalty > 0 and block_timestamp >= CURRENT_DATE - interval '30 days' then origin_from_address end) as "7_days_no_of_early_withdrawers",
coalesce(sum(case when block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then withdrawn_weth_amount END),0) as "24_hours_withdrawn_weth_amount",
count(case when block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then 1 end) as "24_hours_no_of_withdrawals",
count(distinct case when block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then origin_from_address end) as "24_hours_no_of_withdrawers",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then 1 end),0) as "24_hours_no_of_early_withdrawals",
coalesce(sum(case when weth_penalty > 0 and block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then withdrawn_weth_amount end),0) as "24_hours_early_withdrawn_weth_amount",
count(distinct case when weth_penalty > 0 and block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then origin_from_address end) as "24_hours_no_of_early_withdrawers",
coalesce(sum(weth_penalty),0) as weth_penalty,
coalesce(sum(freth_penalty),0) as freth_penalty,
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '30 days' then weth_penalty end),0) as "30_days_weth_penalty",
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '30 days' then freth_penalty end),0) as "30_days_freth_penalty",
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '7 days' then weth_penalty end),0) as "7_days_weth_penalty",
coalesce(sum(case when block_timestamp >= CURRENT_DATE - interval '7 days' then freth_penalty end),0) as "7_days_freth_penalty",
coalesce(sum(case when block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then weth_penalty end),0) as "24_hours_weth_penalty",
coalesce(sum(case when block_timestamp >= CURRENT_TIMESTAMP - interval '24 hours' then freth_penalty end),0) as "24_hours_freth_penalty"
FROM
Run a query to Download Data