Query editor
with clx as (select "tokenId", cast("fileId" as numeric) as "fileId", c.contract_address from clonex."CloneX_evt_CloneXRevealed" cleft join nft.tokens t on t.contract_address = c.contract_address),time_redeemed as (select"loanId",max("evt_block_time") as redeem_timefrom bend."LendingPool_evt_Redeem"group by 1),time_liquidated as (select"loanId",max("evt_block_time") as liq_timefrom bend."LendingPoolLoan_evt_LoanLiquidated"group by 1),last_auctioned as (select"loanId",max("evt_block_time") as last_auction_timefrom bend."LendingPool_evt_Auction"group by 1),time_auctioned as (selectauc."loanId",min("evt_block_time") as bid_startfrom bend."LendingPool_evt_Auction" aucleft join time_redeemed red on red."loanId" = auc."loanId"left join time_liquidated liq on liq."loanId" = auc."loanId"where "evt_block_time" > COALESCE(liq_time, '2022-03-07')and "evt_block_time" > COALESCE(redeem_time, '2022-03-07')group by 1),auction_end as (select"loanId","bid_start","bid_start" + '48 hour'::interval as bid_endfrom time_auctioned),auction_duration as (select"loanId",CASEWHEN extract(second from AGE(bid_end, NOW())) < 0 THEN 'Claiming'ELSE extract(hour from AGE(bid_end, NOW()))||' H '||extract(minute from AGE(bid_end, NOW()))||' M' END AS "Time Left"from auction_end)selectevt_block_time,CASE WHEN name = 'CloneX' thenCONCAT('<a href="https://looksrare.org/collections/',CONCAT('0x', substring("nftAsset"::text from 3)),'/',