Skip to content
Dune
Search
Data
Discover
Favorites
Monitor
Activity
Schedules
Alerts
Connect
Dune APIs
MCP & CLI
API keys
Connectors
Library
Data uploads
Queries
Materialized views
Dashboards
Contracts
Folders
Docs
Upgrade plan
Dune
Discover
Data
Dashboards
Queries
Blockchains
Trending | Dune
icon
@teyeni1593
3 years ago
0
ICONIC
@iconic101
3 years ago
0
VeeFriends Iconics: Volume by Type
@veefriends
4 months ago
0
VeeFriends Iconics: Flip Analysis
@veefriends
4 months ago
0
30d New Holders - Iconics v1.1
@jeremyknowsvf
6 months ago
0
30d New Holders - Iconics
@jeremyknowsvf
6 months ago
0
Icon minute prices
@keval_07
12 days ago
0
Iconics Holder Concentration
@veefriends
4 months ago
0
Iconics Hold Time Distribution
@jeremyknows
5 months ago
0
Iconics Top Holders
@jeremyknows
5 months ago
0
Iconics Holder Change Timeseries
@jeremyknows
5 months ago
0
VeeFriends Iconics: Unrealized PnL Analysis
@veefriends
4 months ago
0
VeeFriends Iconics: Realized PnL Histogram
@veefriends
4 months ago
0
VeeFriends Iconics: Analytics by Character
@veefriends
4 months ago
0
Lost Conviction 30d - Iconics v1.1
@jeremyknowsvf
6 months ago
0
30d Lost Conviction - Iconics
@jeremyknowsvf
6 months ago
0
WITH markets AS ( SELECT fixedProductMarketMaker FROM polymarketfactory_polygon.FixedProductMarketMakerFactory_evt_FixedProductMarketMakerCreation WHERE collateralToken = 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 ), orders_filled as ( select case when md.question is not null then md.question else md2.question end as question, case when md.question_id is not null then md.question_id else md2.question_id end as question_id, case when md.slug is not null then md.slug else md2.slug end as slug, case when md.icon is not null then md.icon else md2.icon end as slug, case when md.description is not null then md.description else md2.description end as description, case when md.new is not null then md.new else md2.new end as new, case when md.archived is not null then md.archived else md2.archived end as archived, case when md.restricted is not null then md.restricted else md2.restricted end as restricted, case when md.neg_risk is not null then md.neg_risk else md2.neg_risk end as neg_risk, case when md.outcome is not null then md.outcome else md2.outcome end as outcome, case when md.clob_token_id is not null then md.clob_token_id else md2.clob_token_id end as clob_token_id, case when md.event_title is not null then md.event_title else md2.event_title end as event_title, case when md.event_slug is not null then md.event_slug else md2.event_slug end as event_slug, case when md.market_maker_address is not null then md.market_maker_address else md2.market_maker_address end as market_maker_address, CASE WHEN neg_market.makerAssetId = 0 THEN neg_market.makerAmountFilled WHEN neg_market.takerAssetId = 0 THEN neg_market.takerAmountFilled END / 1e6 as buyerPaid, neg_market.maker as buyer, neg_market.takerAssetID as takerAssetID, neg_market.evt_tx_hash as evt_tx_hash, date_trunc('month', neg_market.evt_block_time) evt_block_time from polymarket_polygon.NegRiskCtfExchange_evt_OrderFilled neg_market left join query_3999457 md on md.clob_token_id = CAST(neg_market.takerAssetId as VARCHAR) and neg_market.makerAssetId = 0 left join query_3999457 md2 on md2.clob_token_id = CAST(neg_market.makerAssetId as VARCHAR) and neg_market.takerAssetId = 0 UNION ALL select case when md.question is not null then md.question else md2.question end as question, case when md.question_id is not null then md.question_id else md2.question_id end as question_id, case when md.slug is not null then md.slug else md2.slug end as slug, case when md.icon is not null then md.icon else md2.icon end as slug, case when md.description is not null then md.description else md2.description end as description, case when md.new is not null then md.new else md2.new end as new, case when md.archived is not null then md.archived else md2.archived end as archived, case when md.restricted is not null then md.restricted else md2.restricted end as restricted, case when md.neg_risk is not null then md.neg_risk else md2.neg_risk end as neg_risk, case when md.outcome is not null then md.outcome else md2.outcome end as outcome, case when md.clob_token_id is not null then md.clob_token_id else md2.clob_token_id end as clob_token_id, case when md.event_title is not null then md.event_title else md2.event_title end as event_title, case when md.event_slug is not null then md.event_slug else md2.event_slug end as event_slug, case when md.market_maker_address is not null then md.market_maker_address else md2.market_maker_address end as market_maker_address, CASE WHEN pos_market.makerAssetId = 0 THEN pos_market.makerAmountFilled WHEN pos_market.takerAssetId = 0 THEN pos_market.takerAmountFilled END / 1e6 as buyerPaid, pos_market.maker as buyer, pos_market.takerAssetID as takerAssetID, pos_market.evt_tx_hash as evt_tx_hash, date_trunc('month', pos_market.evt_block_time) evt_block_time from polymarket_polygon.CTFExchange_evt_OrderFilled pos_market left join query_3999457 md on md.clob_token_id = CAST(pos_market.takerAssetId as VARCHAR) and pos_market.makerAssetId = 0 left join query_3999457 md2 on md2.clob_token_id = CAST(pos_market.makerAssetId as VARCHAR) and pos_market.takerAssetId = 0 UNION ALL select question, question_id, slug, icon, description, new, archived, restricted, neg_risk, outcome, clob_token_id, event_title, event_slug, market_maker_address, bytearray_to_uint256 (substr(pl.DATA, 1, 32)) / 1e6 as buyerPaid, null as buyer, null as takerAssetID, pl.block_hash as evt_tx_hash, date_trunc('month', pl.block_time) evt_block_time from polygon.logs pl left join query_3999457 md on pl.contract_address = md.market_maker_address --and md.market_maker_address is not null \ where pl.topic0 in ( 0x4f62630f51608fc8a7603a9391a5101e58bd7c276139366fc107dc3b67c3dcf8, 0xadcf2a240ed9300d681d9a3f5382b6c1beed1b7e46643e0c7b42cbe6e2d766b4 ) AND pl.block_number >= 4023680 AND pl.contract_address in ( SELECT * FROM markets ) --where (neg_market.evt_block_time is not null and date_trunc('day',neg_market.evt_block_time) >= date '2024-08-01') or (pos_market.evt_block_time is not null and date_trunc('day',pos_market.evt_block_time) >= date '2024-08-01') ), ranked_data AS ( SELECT CASE WHEN event_title IS NULL THEN 'No Data' ELSE event_title END AS event_title, SUM(buyerPaid) AS volume_usd, DATE_TRUNC('month', evt_block_time) AS month, ROW_NUMBER() OVER ( PARTITION BY DATE_TRUNC('month', evt_block_time) ORDER BY SUM(buyerPaid) DESC ) AS rank FROM orders_filled GROUP BY event_title, DATE_TRUNC('month', evt_block_time) ), categorized_data AS ( SELECT CASE WHEN rank <= 20 and event_title <> 'No Data' THEN event_title ELSE 'Others' END AS event_title, SUM(volume_usd) AS volume_usd, month FROM ranked_data GROUP BY CASE WHEN rank <= 20 and event_title <> 'No Data' THEN event_title ELSE 'Others' END, month ) SELECT event_title, volume_usd, month FROM categorized_data ORDER BY month ASC, volume_usd DESC
@ma1373
1 year ago
1
WITH markets AS ( SELECT fixedProductMarketMaker FROM polymarketfactory_polygon.FixedProductMarketMakerFactory_evt_FixedProductMarketMakerCreation WHERE collateralToken = 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 ), orders_filled as ( select case when md.question is not null then md.question else md2.question end as question, case when md.question_id is not null then md.question_id else md2.question_id end as question_id, case when md.slug is not null then md.slug else md2.slug end as slug, case when md.icon is not null then md.icon else md2.icon end as slug, case when md.description is not null then md.description else md2.description end as description, case when md.new is not null then md.new else md2.new end as new, case when md.archived is not null then md.archived else md2.archived end as archived, case when md.restricted is not null then md.restricted else md2.restricted end as restricted, case when md.neg_risk is not null then md.neg_risk else md2.neg_risk end as neg_risk, case when md.outcome is not null then md.outcome else md2.outcome end as outcome, case when md.clob_token_id is not null then md.clob_token_id else md2.clob_token_id end as clob_token_id, case when md.event_title is not null then md.event_title else md2.event_title end as event_title, case when md.event_slug is not null then md.event_slug else md2.event_slug end as event_slug, case when md.market_maker_address is not null then md.market_maker_address else md2.market_maker_address end as market_maker_address, CASE WHEN neg_market.makerAssetId = 0 THEN neg_market.makerAmountFilled WHEN neg_market.takerAssetId = 0 THEN neg_market.takerAmountFilled END / 1e6 as buyerPaid, neg_market.maker as buyer, neg_market.takerAssetID as takerAssetID, neg_market.evt_tx_hash as evt_tx_hash, date_trunc('month', neg_market.evt_block_time) evt_block_time from polymarket_polygon.NegRiskCtfExchange_evt_OrderFilled neg_market left join query_3999457 md on md.clob_token_id = CAST(neg_market.takerAssetId as VARCHAR) and neg_market.makerAssetId = 0 left join query_3999457 md2 on md2.clob_token_id = CAST(neg_market.makerAssetId as VARCHAR) and neg_market.takerAssetId = 0 UNION ALL select case when md.question is not null then md.question else md2.question end as question, case when md.question_id is not null then md.question_id else md2.question_id end as question_id, case when md.slug is not null then md.slug else md2.slug end as slug, case when md.icon is not null then md.icon else md2.icon end as slug, case when md.description is not null then md.description else md2.description end as description, case when md.new is not null then md.new else md2.new end as new, case when md.archived is not null then md.archived else md2.archived end as archived, case when md.restricted is not null then md.restricted else md2.restricted end as restricted, case when md.neg_risk is not null then md.neg_risk else md2.neg_risk end as neg_risk, case when md.outcome is not null then md.outcome else md2.outcome end as outcome, case when md.clob_token_id is not null then md.clob_token_id else md2.clob_token_id end as clob_token_id, case when md.event_title is not null then md.event_title else md2.event_title end as event_title, case when md.event_slug is not null then md.event_slug else md2.event_slug end as event_slug, case when md.market_maker_address is not null then md.market_maker_address else md2.market_maker_address end as market_maker_address, CASE WHEN pos_market.makerAssetId = 0 THEN pos_market.makerAmountFilled WHEN pos_market.takerAssetId = 0 THEN pos_market.takerAmountFilled END / 1e6 as buyerPaid, pos_market.maker as buyer, pos_market.takerAssetID as takerAssetID, pos_market.evt_tx_hash as evt_tx_hash, date_trunc('month', pos_market.evt_block_time) evt_block_time from polymarket_polygon.CTFExchange_evt_OrderFilled pos_market left join query_3999457 md on md.clob_token_id = CAST(pos_market.takerAssetId as VARCHAR) and pos_market.makerAssetId = 0 left join query_3999457 md2 on md2.clob_token_id = CAST(pos_market.makerAssetId as VARCHAR) and pos_market.takerAssetId = 0 UNION ALL select question, question_id, slug, icon, description, new, archived, restricted, neg_risk, outcome, clob_token_id, event_title, event_slug, market_maker_address, bytearray_to_uint256 (substr(pl.DATA, 1, 32)) / 1e6 as buyerPaid, null as buyer, null as takerAssetID, pl.block_hash as evt_tx_hash, date_trunc('month', pl.block_time) evt_block_time from polygon.logs pl left join query_3999457 md on pl.contract_address = md.market_maker_address --and md.market_maker_address is not null \ where pl.topic0 in ( 0x4f62630f51608fc8a7603a9391a5101e58bd7c276139366fc107dc3b67c3dcf8, 0xadcf2a240ed9300d681d9a3f5382b6c1beed1b7e46643e0c7b42cbe6e2d766b4 ) AND pl.block_number >= 4023680 AND pl.contract_address in ( SELECT * FROM markets ) --where (neg_market.evt_block_time is not null and date_trunc('day',neg_market.evt_block_time) >= date '2024-08-01') or (pos_market.evt_block_time is not null and date_trunc('day',pos_market.evt_block_time) >= date '2024-08-01') ), ranked_data AS ( SELECT CASE WHEN event_title IS NULL THEN 'No Data' ELSE event_title END AS event_title, SUM(buyerPaid) AS volume_usd, DATE_TRUNC('month', evt_block_time) AS month, ROW_NUMBER() OVER ( PARTITION BY DATE_TRUNC('month', evt_block_time) ORDER BY SUM(buyerPaid) DESC ) AS rank FROM orders_filled GROUP BY event_title, DATE_TRUNC('month', evt_block_time) ), categorized_data AS ( SELECT CASE WHEN rank <= 20 and event_title <> 'No Data' THEN event_title ELSE 'Others' END AS event_title, SUM(volume_usd) AS volume_usd, month FROM ranked_data GROUP BY CASE WHEN rank <= 20 and event_title <> 'No Data' THEN event_title ELSE 'Others' END, month ) SELECT event_title, volume_usd, month FROM categorized_data ORDER BY month ASC, volume_usd DESC
@ma1373
1 year ago
1
iconic 1
@iconicmichel
3 years ago
0
Iconics That Have Wrapped
@msg3
3 years ago
0