MufasaGMP acitivity overview of Squid
Updated 2023-02-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 data_one as (
SELECT DISTINCT tx_hash
FROM bsc.core.fact_token_transfers
WHERE to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
), data_two as (
SELECT DISTINCT tx_hash
FROM bsc.core.fact_token_transfers
WHERE to_address LIKE lower('0x0000000000000000000000000000000000000000')
AND contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
), data_three as (
SELECT DISTINCT tx_hash as tx_in
FROM bsc.core.fact_token_transfers
WHERE from_address LIKE lower('0x0000000000000000000000000000000000000000')
AND contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
), data_four as (
SELECT
tx_hash,
block_timestamp,
origin_from_address as tx_sender,
avg(RAW_AMOUNT / power(10, 6)) as volume
FROM bsc.core.fact_token_transfers
WHERE tx_hash in (SELECT * FROM data_one)
AND tx_hash IN (SELECT * FROM data_two)
AND contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
GROUP BY 1,2,3
), data_five as (
SELECT
tx_hash,
try_hex_decode_string(substr(data, 3 + (64*7), 16)) as block_chain_to
FROM bsc.core.fact_event_logs
WHERE tx_hash in (SELECT tx_hash from data_four)
AND topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
HAVING not block_chain_to is NULL
), data_six as (
SELECT DISTINCT tx_hash
Run a query to Download Data