DataBeingNumber of Bids Background Trait at Auction
Updated 2022-06-12
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with Nouns_attributes as (select
block_number as mint_block,
block_timestamp as mint_time,
tx_hash as mint_hash,
contract_address,
tokenflow_eth.hextoint(topics[1])::integer as tokenID,
tokenflow_eth.hextoint(substr(data,3,64)) as background,
tokenflow_eth.hextoint(substr(data,67,64)) as body,
tokenflow_eth.hextoint(substr(data,131,64)) as accessory,
tokenflow_eth.hextoint(substr(data,195,64)) as head,
tokenflow_eth.hextoint(substr(data,259,64)) as glasses
from ethereum.core.fact_event_logs
where block_number > 12000000
and contract_address = '0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03'
and topics[0]::string = '0x1106ee9d020bfbb5ee34cf5535a5fbf024a011bd130078088cbf124ab3092478'
order by tokenId desc),
Noun_auction_settled as (select
tokenid, block_number
from ethereum.core.ez_nft_transfers
WHERE nft_address = '0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03'
and nft_from_address = '0x830bd73e4184cef73443c15111a1df14e495c706'),
Nouns_auction_settled_attributes as (
SELECT s.tokenid, s.block_number, a.background, a.body, a.accessory, a.head, a.glasses
FROM noun_auction_settled as s
RIGHT JOIN Nouns_attributes as a on a.tokenid = s.tokenid
ORDER BY 1 LIMIT 303),
bids_made as (SELECT COUNT(tx_hash) as bids, tokenflow_eth.hextoint(topics[1])::integer as tokenid
FROM ethereum.core.fact_event_logs
WHERE origin_to_address = lower('0x830BD73E4184ceF73443C15111a1DF14e495C706') and topics[0]::string = '0x1159164c56f277e6fc99c11731bd380e0347deb969b75523398734c252706ea3'
GROUP BY 2)
-- join as (
SELECT sum(bids) as bids, a.Background
Run a query to Download Data