Updated 2023-01-17
    with list as (
    select
    message_value:label as name,
    attributes:instantiate:_contract_address as contract_address,
    message_value:admin as creator,
    tx_id as tx,
    block_timestamp::date as time
    from terra.core.ez_messages where message_type='/cosmwasm.wasm.v1.MsgInstantiateContract' and tx_succeeded='TRUE')
    select
    case
    when
    message_value:contract='terra1hemztvj7anl6ztqwnl9amklznw6rtgzrcjdq2jepy6rmt0c5uqxss27g6k' then 'TPT No.001002'
    when
    message_value:contract='terra1hz6ml6kqrr3gdl7wzp97352mql5lkd3qjas8fpkkqumvmlxf8qpst0zcah' then 'Astroport luna-axlusdc pair Helper?'
    when
    message_value:contract='terra1ydpwzsgurl4asspkuy47zg27grv9mjdahk36lnj43kev3lz0cfhqxaq369' then 'TPT No.000206'
    when
    message_value:contract='terra14hfrsmt92qsf46rxwjk3gsjg3v5qsu9w0aa7wxtuvgy89sewwflqj9mddk' then 'TPT No.000205'
    when
    message_value:contract='terra1rzeslnvzj8cwh8jwmkynxea9x74g5958z7cjq4vkuxw5slnw7raqxdvpxe' then 'Randomearth'
    when
    message_value:contract='terra19hz374h6ruwtzrnm8ytkae782uv79h9yt9tuytgvt94t26c4793qnfg7vn' then 'TFM Router'
    when
    message_value:contract='terra19lg3vqvlw8agx5vz9an2tepkpvsck85eqcps370757fskmxay3msq8chul' then 'TPT Table'
    when
    message_value:contract='terra1ksa3k39jgx8p9yzfu8wtmx2rph2t9sxlkx6jxjymqfgypul56phqmzl5sm' then 'TPT Table'
    else label end as label,
    message_value:contract as contract2,
    project_name,
    count(distinct tx_id) as txs,
    count(distinct message_value:sender) as unique_users
    from
    terra.core.ez_messages left join terra.core.dim_address_labels
    on address=message_value:contract
    where message_type='/cosmwasm.wasm.v1.MsgExecuteContract'
    --message_value:contract -- contract
    Run a query to Download Data