hbd1994Bitcoin
Updated 2023-09-25
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
34
35
36
›
⌄
with live as (
SELECT
RESP:data:bitcoin:usd as live_btc_usd_price
from (SELECT livequery.live.udf_api(
'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd') as resp))
(select
date(BLOCK_TIMESTAMP) as "Date",
tx_id as "Transaction ID",
fee as "Transaction Fee",
fee * live_btc_usd_price as "Transaction Fee (USD)",
row_number() over (order by "Transaction Fee" desc) as "Order"
from bitcoin.core.fact_transactions,live
qualify "Order" between 1 and 10)
union all
(select
date(BLOCK_TIMESTAMP) as "Date",
tx_id as "Transaction ID",
fee as "Transaction Fee",
fee * live_btc_usd_price as "Transaction Fee (USD)",
row_number() over (order by "Transaction Fee" desc) as "Order"
from bitcoin.core.fact_transactions,live
qualify "Order" between 11 and 20)
union all
(select
date(BLOCK_TIMESTAMP) as "Date",
tx_id as "Transaction ID",
fee as "Transaction Fee",
fee * live_btc_usd_price as "Transaction Fee (USD)",
row_number() over (order by "Transaction Fee" desc) as "Order"
from bitcoin.core.fact_transactions,live
qualify "Order" between 21 and 30)
union all
(select
date(BLOCK_TIMESTAMP) as "Date",
Run a query to Download Data