mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 13:56:50 +00:00
31 lines
564 B
SQL
31 lines
564 B
SQL
{{ config(
|
|
materialized = 'view',
|
|
tags = ['streamline'],
|
|
) }}
|
|
|
|
WITH pre_final AS (
|
|
|
|
SELECT
|
|
SEQ8()+98680445 AS block_id
|
|
FROM
|
|
TABLE(GENERATOR(rowcount => 60000000))
|
|
WHERE
|
|
block_id > 98680445
|
|
AND block_id <= 148693779
|
|
EXCEPT
|
|
SELECT
|
|
block_id
|
|
FROM
|
|
{{ ref('streamline__complete_block_txs') }}
|
|
)
|
|
SELECT
|
|
block_id,
|
|
(
|
|
SELECT
|
|
coalesce(MAX(_partition_id) + 1,1)
|
|
FROM
|
|
{{ ref('streamline__complete_block_txs') }}
|
|
) AS batch_id
|
|
FROM
|
|
pre_final
|