banterlyticsport value error
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 FriendtechShares AS (
SELECT
contract_address,
TX_HASH as evt_tx_hash,
BLOCK_TIMESTAMP as evt_block_time,
BLOCK_NUMBER as evt_block_number,
EVENT_INDEX as evt_index,
decoded_log:ethAmount::NUMBER/1e18 AS ethAmount,
decoded_log:isBuy::string AS isBuy,
decoded_log:protocolEthAmount::NUMBER/1e18 AS protocolEthAmount,
decoded_log:shareAmount AS shareAmount,
decoded_log:subject AS subject,
(decoded_log:subjectEthAmount) AS subjectEthAmount,
decoded_log:supply AS supply,
decoded_log:trader AS trader
FROM base.core.fact_decoded_event_logs
WHERE contract_address = '0xcf205808ed36593aa40a44f10c7f7c2f67d4a4d4'
AND block_timestamp > '2023-08-06'
),
Query2944141 AS (
SELECT
BLOCK_TIMESTAMP as block_time,
BLOCK_NUMBER as block_number,
CASE WHEN decoded_log:isBuy::string = true THEN 'Buy' ELSE 'Sell' END AS type,
decoded_log:shareAmount AS shareAmount,
CASE WHEN decoded_log:isBuy::string = true THEN shareAmount ELSE -shareAmount END AS shareAmountDelta,
decoded_log:subject AS subject,
(decoded_log:ethAmount::NUMBER/1e18)/(decoded_log:shareAmount) AS sharePriceETH,
decoded_log:ethAmount::NUMBER/1e18 as volumeETH,
decoded_log:protocolEthAmount::NUMBER/1e18 AS feeETH,
decoded_log:supply AS supply,
decoded_log:trader AS trader,
TX_HASH,
EVENT_INDEX as evt_index
FROM base.core.fact_decoded_event_logs
WHERE contract_address = '0xcf205808ed36593aa40a44f10c7f7c2f67d4a4d4'
Run a query to Download Data