Query editor
WITH lock_transactions AS(select distinct contract_address, count(evt_block_time) as keys_sold from unlock_ethereum.PublicLock_evt_Transferwhere "from" = 0x0000000000000000000000000000000000000000 and evt_block_time > (now() - Interval '30' day)group by contract_address),lock_name_table AS(select ltrim(from_utf8(bytearray_substring(data,bytearray_length(data)-91,91))) as lock_name, hash, to from ethereum.transactionswhere (to = 0xe79B93f8E22676774F2A8dAd469175ebd00029FA or to = 0x3d5409cce1d45233de1d4ebdee74b8e004abdd13) and (bytearray_substring(data,1,4) = 0x42d92106 OR bytearray_substring(data,1,4) = 0x487a8a76)),new_locks AS(SELECT newLockAddress, evt_tx_hash, evt_block_time as date_created from unlock_ethereum.Unlock_evt_NewLock)SELECT contract_address, keys_sold, lock_name, date_created FROM lock_transactionsINNER JOIN new_locksON lock_transactions.contract_address = new_locks.newLockAddressINNER JOIN lock_name_tableON lock_name_table.hash = new_locks.evt_tx_hashORDER BY keys_sold DESC