我正在处理一个执行此任务的查询(尚未优化),但我需要在发送方列中设置一些格式。
WITH logs as (
SELECT txs.from AS sender, COUNT(txs.from) AS num_transactions
FROM xDai.Logs as xlogs, xDai.Transactions as txs
WHERE xlogs.contract_address = CONCAT('\x', substring('{{contract}}' from 3))::bytea -- STAGE
AND xlogs.tx_hash = txs.hash
GROUP BY txs.from
LIMIT 100
)
SELECT *
FROM logs
ORDER BY num_transactions DESC我尝试过(和类似的):
SELECT CONCAT('0', substring(txs.from from 1)) AS sender\x6cc661f688333ccab20670e77e52de350228ded9我想要的
0x6cc661f688333ccab20670e77e52de350228ded9知道怎么做吗?非常感谢!!
发布于 2022-05-05 16:03:23
试试REPLACE(sender, '\x', '0x') as sender0x或其他类似的东西
https://ethereum.stackexchange.com/questions/115608
复制相似问题