Lordking✅ distribution - widget
Updated 2024-05-14Copy Reference Fork
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
›
⌄
with
raw as (
SELECT livequery.live.udf_api(
'GET',
'https://api.flipsidecrypto.com/api/v2/queries/446f457a-755b-4004-ba8e-c020967a15aa/data/latest',
{'accept': 'application/json'},{}) as response)
,builddao_user as (
SELECT
VALUE:Role as Role ,
VALUE:Signer as Signer
FROM raw,LATERAL FLATTEN (input => response:data))
,final_widget as
(select
distinct trxs.BLOCK_TIMESTAMP,
trxs.TX_HASH,
calls.PREDECESSOR_ID as SIGNER_ID,
calls.DEPOSIT/pow(10,24)as DEPOSIT,
trxs.WIDGET_NAME ,
trxs.METADATA ,
trxs.WIDGET_URL,
trxs.METADATA:fork_of as fork_of,
row_number () over (partition by trxs.WIDGET_URL order by trxs.BLOCK_TIMESTAMP asc) date_rank
from near.core.fact_actions_events_function_call calls
inner join near.social.fact_widget_deployments trxs
on trxs.TX_HASH = calls.TX_HASH
where RECEIPT_SUCCEEDED='TRUE'
and calls.PREDECESSOR_ID in (select distinct Signer from builddao_user)
)
,deposit as (
QueryRunArchived: QueryRun has been archived