sixahi6066BTC Coinbase Addresses
Updated 2024-04-10
99
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
›
⌄
-- forked from BTC Test @https://flipsidecrypto.xyz/edit/queries/87fe651f-9feb-4e7d-9b3e-3b25f3e25dd3
select * FROM bitcoin.core.fact_transactions
WHERE
block_timestamp >= '2024-04-09'
and block_timestamp <= '2024-04-10'
and is_coinbase = TRUE
limit
1000
JSON_EXTRACT(output, '$.scriptPubKey.address') AS address,
MAX(JSON_EXTRACT(output, '$.value')) AS max_value
FROM (
SELECT
JSON_TABLE(
outputs,
'$[*]' COLUMNS(
output JSON PATH '$'
)
) AS jt
FROM transactions
-- Assuming 'transactions' is your table name and 'outputs' is your JSON column
) AS outputs
WHERE JSON_EXTRACT(output, '$.scriptPubKey.address') IS NOT NULL
GROUP BY address
ORDER BY max_value DESC
LIMIT 1;
-- https://flipsidecrypto.github.io/bitcoin-models/#!/model/model.bitcoin_models.core__fact_transactions
QueryRunArchived: QueryRun has been archived