intellidegentSession 4
    Updated 2022-12-07
    select
    tx_hash, input_data
    from ethereum.core.fact_transactions
    where block_timestamp::date = '2022-08-15'
    and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'
    order by block_timestamp desc
    limit 10

    select
    substr (input_data, 1, 10),
    input_data
    from ethereum.core.fact_transactions
    where block_timestamp::date = '2022-08-15'
    and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'
    order by block_timestamp desc
    limit 10


    -- events table == logs tab in etherscan
    -- event is a basic level event that can be done. e.g. approval of contract to spend token. Transfer of a token. Etc.
    -- Event Index - an arbitrary list of numbers in ascending order. They never skip a number. Same event index shown in etherscan. Order in which the events occurred.
    --
    select *
    from ethereum.core.fact_event_logs
    where block_timestamp::date = '2022-08-15'
    and tx_hash = '0x32844e66c41bf08a8c3d249d1dd53a404831bc486e094342dc4b79ae9c7aa8d3'

    -- wad = means 18 decimal places
    --codebeautify.org/jsonviewer
    select
    event_index,
    contract_address,
    event_inputs:from,
    event_inputs:to,
    event_inputs:value / pow(10, 18), ---divides by 10 to the power of 18
    event_inputs:value / 1e18,
    Run a query to Download Data