freemartiansyncswap user swaps per token copy
Updated 2023-11-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with raw_data AS (
SELECT
chainbase_utils.post('/v1/dw/query',
{ 'query':
'
select
block_timestamp, transaction_hash, (gas_used * gas_price / pow(10,18)) as fee
from
zksync.transactions
where
left(input, 10) in ("0x2cc4081e")
and from_address in ("{{wallet}}")
and to_address in ("0x621425a1Ef6abE91058E9712575dcc4258F8d091","0x2da10a1e27bf85cedd8ffb1abbe97e53391c0295")
' }) AS respponse
)
SELECT
value:block_timestamp AS timestamp,
to_varchar(value:block_timestamp::timestamp, 'yyyy-mm-dd hh24:00:00.000') AS timestamp_hour,
value:transaction_hash AS transaction_hash,
value:fee AS value
FROM raw_data, LATERAL FLATTEN(input => respponse:data:data:result)
INNER JOIN ethereum.price.ez_hourly_token_prices p ON hour = to_varchar(value:block_timestamp::timestamp, 'yyyy-mm-dd hh24:00:00.000')
Run a query to Download Data