theericstonesquid genrall test 555 - 1 copy
Updated 2023-02-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 93a6fb77-b6b7-4f3f-9451-194d80a51a1e
with abc1 as (
SELECT DISTINCT tx_hash
FROM bsc.core.fact_token_transfers
WHERE to_address LIKE lower('0xce16f69375520ab01377ce7b88f5ba8c48f8d666')
--AND contract_address LIKE lower('0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed')
), abc2 as (
SELECT DISTINCT tx_hash
FROM bsc.core.fact_token_transfers
WHERE to_address LIKE lower('0x0000000000000000000000000000000000000000')
AND contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
), abc3 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')
), abcde1 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 abc1)
AND tx_hash IN (SELECT * FROM abc2)
AND contract_address LIKE lower('0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3')
GROUP BY 1,2,3
), abcde2 as (
SELECT
tx_hash,
try_hex_decode_string(substr(data, 3 + (64*7), 16)) as to_chain
FROM bsc.core.fact_event_logs
WHERE tx_hash in (SELECT tx_hash from abcde1)
AND topics[0] = '0x999d431b58761213cf53af96262b67a069cbd963499fd8effd1e21556217b841'
Run a query to Download Data