Query editor
with ALL as ( SELECT block_date as DateTime,Count(*) as tx_count , sum(fee) as tx_fee , sum(virtual_size) as tx_vsizeFROM bitcoin.transactionsWHERE 1=1 and block_height > 777000 and block_date < date_trunc('day', now())GROUP BY 1 ),RnB as (SELECT block_date as DateTime, Count(*) as RnB_count , sum(fee) as RnB_fee , sum(virtual_size) as RnB_vsFROM bitcoin.transactionsWHERE block_height > 777000 and block_date < date_trunc('day', now())AND cast(hex AS VARCHAR) LIKE '%0000000000000000__6a5d%'AND cast(hex AS VARCHAR) LIKE '%0063036f726401%'AND cast(hex AS VARCHAR) LIKE '%6272632d3230%'GROUP BY 1),All_RnI as (SELECT block_date as DateTime, Count(*) as All_RnI_count , sum(fee) as All_RnI_fee , sum(virtual_size) as All_RnI_vsizeFROM bitcoin.transactionsWHERE block_height > 777000 and block_date < date_trunc('day', now())AND cast(hex AS VARCHAR) LIKE '%0000000000000000__6a5d%'AND cast(hex AS VARCHAR) LIKE '%0063036f726401%'GROUP BY 1),All_Runes as (SELECT block_date as DateTime, Count(*) as All_Runes_count , sum(fee) as All_Runes_fee , sum(virtual_size) as All_Runes_vsizeFROM bitcoin.transactionsWHERE block_height > 777000 and block_date < date_trunc('day', now())AND cast(hex AS VARCHAR) LIKE '%0000000000000000__6a5d%'GROUP BY 1),All_BRC20 as (SELECT block_date as DateTime,Count(*) as All_BRC20_count , sum(fee) as All_BRC20_fee , sum(virtual_size) as All_BRC20_vsizeFROM bitcoin.transactionsWHERE block_height > 777000 and block_date < date_trunc('day', now())AND cast(hex AS VARCHAR) LIKE '%0063036f726401%'AND cast(hex AS VARCHAR) LIKE '%6272632d3230%'GROUP BY 1),All_Inscriptions as (SELECT block_date as DateTime,Count(*) as All_Inscriptions_count , sum(fee) as All_Inscriptions_fee , sum(virtual_size) as All_Inscriptions_vsizeFROM bitcoin.transactionsWHERE block_height > 777000 and block_date < date_trunc('day', now())AND cast(hex AS VARCHAR) LIKE '%0063036f726401%'GROUP BY 1)SELECTALL.DateTime AS Day,(tx_count - COALESCE(All_Inscriptions_count, 0) - COALESCE(All_Runes_count, 0) + COALESCE(All_RnI_count, 0)) AS regular_txs,COALESCE(RnB_count, 0) AS RnB_txs,(COALESCE(All_RnI_count,0) - COALESCE(RnB_count, 0)) as Other_RnI_txs,(COALESCE(All_BRC20_count, 0) - COALESCE(RnB_count, 0)) AS Only_BRC20_txs,(COALESCE(All_Inscriptions_count, 0) - COALESCE(All_BRC20_count, 0) - COALESCE(All_RnI_count, 0) + COALESCE(RnB_count, 0)) AS Other_Inscriptions_txs,(COALESCE(All_Runes_count, 0) - COALESCE(All_RnI_count, 0)) AS Only_Runes_txs,(tx_fee - COALESCE(All_Inscriptions_fee, 0) - COALESCE(All_Runes_fee, 0) + COALESCE(All_RnI_fee, 0)) AS regular_tx_Fee,COALESCE(RnB_fee, 0) AS RnB_Fee,(COALESCE(All_RnI_fee,0) - COALESCE(RnB_fee, 0)) as Other_RnI_Fee,(COALESCE(All_BRC20_fee, 0) - COALESCE(RnB_fee, 0)) AS Only_BRC20_Fee,(COALESCE(All_Inscriptions_fee, 0) - COALESCE(All_BRC20_fee, 0) - COALESCE(All_RnI_fee, 0) + COALESCE(RnB_fee, 0)) AS Other_Inscriptions_Fee,(COALESCE(All_Runes_fee, 0) - COALESCE(All_RnI_fee, 0)) AS Only_Runes_Fee,(tx_vsize - COALESCE(All_Inscriptions_vsize, 0) - COALESCE(All_Runes_vsize, 0) + COALESCE(All_RnI_vsize, 0)) AS regular_tx_vsize,COALESCE(RnB_vs, 0) AS RnB_vsize,(COALESCE(All_RnI_vsize,0) - COALESCE(RnB_vs, 0)) as Other_RnI_vsize,(COALESCE(All_BRC20_vsize, 0) - COALESCE(RnB_vs, 0)) AS Only_BRC20_vsize,(COALESCE(All_Inscriptions_vsize, 0) - COALESCE(All_BRC20_vsize, 0) - COALESCE(All_RnI_vsize, 0) + COALESCE(RnB_vs, 0)) AS Other_Inscription_vsize,(COALESCE(All_Runes_vsize, 0) - COALESCE(All_RnI_vsize, 0)) AS Only_Runes_vsizeFROM ALLLEFT JOIN RnB On RnB.DateTime = ALL.DateTimeLEFT JOIN All_RnI on All_RnI.DateTime = ALL.DateTimeLEFT JOIN All_BRC20 On All_BRC20.DateTime = ALL.DateTimeLEFT JOIN All_Inscriptions On All_Inscriptions.DateTime = ALL.DateTimeLEFT JOIN All_Runes On All_Runes.DateTime = ALL.DateTimeORDER BY Day DESC