LordkingUntitled Query copy
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
›
⌄
-- forked from Untitled Query @ https://flipsidecrypto.xyz/edit/queries/38e6cddb-b7c6-4dd6-8a8e-ffd6ec2aedd0
with a as
(
select BLOCK_TIMESTAMP ,TX_HASH , ORIGIN_FROM_ADDRESS , AMOUNT_USD , AMOUNT ,
case
WHEN lower(TO_ADDRESS) =('0x55a68016910a7bcb0ed63775437e04d2bb70d570') THEN 'Staking Pool 1'
WHEN lower(TO_ADDRESS) =('0xea02df45f56a690071022c45c95c46e7f61d3eab') THEN 'Staking Pool 3'
WHEN lower(TO_ADDRESS) =lower('0x6b1D394Ca67fDB9C90BBd26FE692DdA4F4f53ECD') THEN 'Staking Pool 4'
WHEN lower(TO_ADDRESS) =lower('0x37b1E4590638A266591a9C11d6f945fe7A1adAA7') THEN 'Staking Pool 7'
WHEN lower(TO_ADDRESS) = lower('0xC3359DbdD579A3538Ea49669002e8E8eeA191433') THEN 'Staking Pool 9'
WHEN lower(TO_ADDRESS) =lower ('0x03c1eaff32c4bd67ee750ab75ce85ba7e5aa65fb') THEN 'Staking Pool 8'
WHEN lower(TO_ADDRESS) = lower('0x36d69afE2194F9A1756ba1956CE2e0287A40F671') THEN 'Staking Pool 10'
end as pool ,TO_ADDRESS
from ethereum.core.ez_token_transfers
where CONTRACT_ADDRESS ='0xcafe001067cdef266afb7eb5a286dcfd277f3de5'
AND ORIGIN_FUNCTION_SIGNATURE = '0xec62d4d5')
select
date_trunc('month',BLOCK_TIMESTAMP) as date ,pool ,
count(distinct TX_HASH ) as trxs ,
count(distinct ORIGIN_FROM_ADDRESS ) as uSERS ,
sum(AMOUNT) as PSP ,
sum(AMOUNT_USD) as USD
FROM A GROUP BY 1,2
Run a query to Download Data