0xbiliquidity-mining -lp user keep rate
    Updated 2023-08-12
    with lp_action as
    (
    SELECT
    BLOCK_TIMESTAMP
    ,date_trunc('day',BLOCK_TIMESTAMP) as stat_date
    ,TX_HASH
    ,CONTRACT_ADDRESS
    ,DECODED_LOG['reward']/1e18 as amount
    ,DECODED_LOG['user'] as user_address
    ,EVENT_NAME
    from ethereum.core.ez_decoded_event_logs
    where CONTRACT_ADDRESS in ('0x6c3e4cb2e96b01f4b866965a91ed4437839a121a','0x7fba4b8dc5e7616e59622806932dbea72537a56b','0xa1484c3aa22a66c62b77e0ae78e15258bd0cb711','0xca35e32e7926b96a9988f61d510e038108d8068e')
    and EVENT_NAME in ('RewardPaid')
    and TX_STATUS='SUCCESS'
    union all
    SELECT
    BLOCK_TIMESTAMP
    ,date_trunc('day',BLOCK_TIMESTAMP) as stat_date
    ,TX_HASH
    ,CONTRACT_ADDRESS
    ,DECODED_LOG['amount']/1e18 as amount
    ,DECODED_LOG['user'] as user_address
    ,EVENT_NAME
    from ethereum.core.ez_decoded_event_logs
    where CONTRACT_ADDRESS in ('0x6c3e4cb2e96b01f4b866965a91ed4437839a121a','0x7fba4b8dc5e7616e59622806932dbea72537a56b','0xa1484c3aa22a66c62b77e0ae78e15258bd0cb711','0xca35e32e7926b96a9988f61d510e038108d8068e')
    and EVENT_NAME in ('Withdrawn')
    and TX_STATUS='SUCCESS'
    union all
    SELECT
    BLOCK_TIMESTAMP
    ,date_trunc('day',BLOCK_TIMESTAMP) as stat_date
    ,TX_HASH
    Run a query to Download Data