bq_commands.sh 1.5 KB

1234567891011121314
  1. # get txs from 1 week
  2. bq --location=US query --destination_table lexical-theory-329617:crypto_ethereum.transactions_1week --use_legacy_sql=false "select from_address, to_address, value, block_timestamp, block_number from bigquery-public-data.crypto_ethereum.transactions where (block_number >= 13285098) and (block_number <= 13330090)"
  3. # get txs from 1 month
  4. bq --location=US query --destination_table lexical-theory-329617:crypto_ethereum.transactions_1month --use_legacy_sql=false "select from_address, to_address, value, block_timestamp, block_number from bigquery-public-data.crypto_ethereum.transactions where (block_number >= 13136427) and (block_number <= 13330090)"
  5. # get txs from 1 year
  6. bq --location=US query --destination_table lexical-theory-329617:crypto_ethereum.transactions_1year --use_legacy_sql=false "select from_address, to_address, value, block_timestamp, block_number from bigquery-public-data.crypto_ethereum.transactions where (block_number >= 10966874) and (block_number <= 13330090)"
  7. # get all txs before date
  8. bq --location=US query --destination_table lexical-theory-329617:crypto_ethereum.transactions3 --use_legacy_sql=false "select b.from_address, b.to_address, b.hash as transaction, b.value, b.block_timestamp, b.block_number from bigquery-public-data.crypto_ethereum.transactions as b where b.block_number <= 13330090"
  9. # get blocks before date
  10. bq --location=US query --destination_table lexical-theory-329617:crypto_ethereum.blocks --use_legacy_sql=false "select * from bigquery-public-data.crypto_ethereum.blocks where block_number <= 13330090"