29 rows yesterday at 7:54 PM
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
WITH cryptopunk_sales AS (
SELECT
block_hash,
block_number,
DATE_TRUNC('day', timestamp) AS stringDay,
input_0_value_uint256 AS punk_id, -- Assuming this is the punk ID
CAST(input_1_value_uint256 / 1e18 AS DOUBLE) AS sale_price_eth, -- Assuming this is the sale price
input_2_value_address AS buyer_address, -- Assuming this is the buyer's address
input_3_value_address AS seller_address -- Assuming this is the seller's address
FROM
evm_events_ethereum_mainnet_v1
WHERE
address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
AND signature = 'PunkBought(uint256,uint256,address,address)'
AND timestamp >= now() - interval '1 months'
)
SELECT
stringDay as chart_x,
SUM(sale_price_eth) AS chart_y,
COUNT(block_hash) AS total_sales
FROM
cryptopunk_sales
GROUP BY
chart_x
ORDER BY
chart_x DESC;