Query editor
With lot_count as (select address,shib_balance/100000 as shib_lot,bubble_balance/100 as bubble_lotfrom query_4445986),lot_cond as (select address, CASEWHEN bubble_lot>shib_lot THEN shib_lotWHEN shib_lot>bubble_lot THEN bubble_lotEND AS final_lot from lot_count)select address, ROW_NUMBER() OVER (ORDER BY final_lot DESC) AS ranking, final_lot from lot_condwhere address != 0xf89d7b9c864f589bbf53a82105107622b35eaa40 andaddress != 0x4fb312915b779b1339388e14b6d079741ca83128 andaddress != 0x9642b23ed1e01df1092b92641051881a322f5d4e andaddress != 0xa03400e098f4421b34a3a44a1b4e571419517687 andaddress != 0x1729dbe5b8a47d0f3c65e890efc480da1c2ddcdf andaddress != 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD andaddress != 0x0d0707963952f2fba59dd06f2b425ace40b492fe andaddress != 0x74de5d4fcbf63e00296fd95d33236b9794016631 andaddress != 0xdef171fe48cf0115b1d80b88dc8eab59176fee57 andaddress != 0x75e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 andaddress != 0x9008d19f58aabd9ed0d60971565aa8510560ab41 andaddress != 0xc36442b4a4522e871399cd717abdd847ab11fe88 andaddress != 0x1111111254eeb25477b68fb85ed929f73a960582 andaddress != 0x3451b6b219478037a1ac572706627fc2bda1e812 andaddress != 0xf081470f5c6fbccf48cc4e5b82dd926409dcdd67 andaddress != 0x6b75d8af000000e20b7a7ddf000ba900b4009a80 andaddress != 0x22f9dcf4647084d6c31b2765f6910cd85c178c18 andaddress != 0x1f2f10d1c40777ae1da742455c65828ff36df387 andaddress != 0x111111125421ca6dc452d289314280a0f8842a65 andaddress != 0xae261952d104d5dfe6c4fe17564cd7363bd3405c andaddress != 0x8df9efbf73043d8d95af095fea98f2c45e91521a group by address, final_lot;