--The first block of year 2022 is 3599602.
/*
Disclaimers:
Do not use before block 5531994 (first v1.88.1 code block), due to unrecorded Midgard outbounds,
as addressed and fixed by by
https://gitlab.com/thorchain/thornode/-/issues/1301
and
https://gitlab.com/thorchain/thornode/-/merge_requests/2221
.
First v1.88.1 code block: 5531995.
First v1.88.1 BTC.BTC refund-relevant block: 5532540.
BTC.BTC starting block chosen to avoid initial offset from coming between paired events: 5532105
First v1.96.1 (code-in-effect) block: 7368566
*/
/*
--'Run Selected':
SELECT MIN(block_id), MAX(block_id)
FROM thorchain.block_pool_depths
WHERE DATE(block_timestamp) IN ('2022-03-08', '2022-05-14')
*/
WITH
cointype AS
(
SELECT
SPLIT('BNB.BUSD', '-')[0] AS coin,
4585130 AS hajimari, --4585130 start of 2022-03-08.
5564234 AS owari --5564234 end of 2022-05-14.
),
outboundaddresses AS (