pinax-network / substreams-raw-blocks

Substreams Raw Blocks
MIT License
0 stars 2 forks source link

add `Projections` to order by block number & date #14

Open DenisCarriere opened 1 day ago

DenisCarriere commented 1 day ago

https://clickhouse.com/docs/en/sql-reference/statements/alter/projection

ALTER TABLE transactions ADD PROJECTION transactions_block_projection (
SELECT
*
ORDER BY block_number, block_date
)

ALTER TABLE transactions MATERIALIZE PROJECTION transactions_block_projection
fschoell commented 1 day ago

No need to add it afterwards, we can include this in the create table statement. See docs (at least for chains that are not synced yet)

DenisCarriere commented 1 day ago

Oh nice! can simply add PROJECTION 🔥 i'll update that