0xHaM-d$USM Top Holders Type
Updated 2024-08-15
999
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
›
⌄
-- forked from Power Users Among $USM Top Holders @ https://flipsidecrypto.xyz/edit/queries/45a62182-6413-491b-b89b-4b04729472be
-- forked from MoDeFi / $USM Top Holders @ https://flipsidecrypto.xyz/MoDeFi/q/MjVxcN1hApo7/usm-top-holders
with succeeded_txs as (
select tx_hash as tx
from near.core.fact_transactions
where tx_succeeded=true
and block_timestamp::date>='2024-04-01'
),
price as (
select
value[0]::string as hour,
value[1]::float as price
from (select livequery.live.udf_api('https://flipsidecrypto.xyz/api/queries/cf450d4e-ca28-4c75-8576-220421a22017/latest-run')
as response), lateral FLATTEN (input => response:data:result:rows)),
date_start as (
with dates AS (
SELECT CAST('2024-04-10' AS DATE) AS start_date
UNION ALL
SELECT DATEADD(day, 1, start_date)
FROM dates
WHERE start_date < CURRENT_DATE())
SELECT date_trunc(day, start_date) AS start_date
FROM dates),
----------------------- ft transfers -----------------------
--$usmeme token transfers
usmeme_transfers as (
select block_id, block_timestamp,
event_json:data[0]:old_owner_id::string as from_address,
event_json:data[0]:new_owner_id::string as to_address,
event_json:data[0]:amount as amount_raw,
event_json:data[0]:amount/pow(10,8) as amount,
QueryRunArchived: QueryRun has been archived