DEV Community

Ayden
Ayden

Posted on

How to use dune.com to collect some NFTs data

What is dune ?

Dune is a powerful tool for blockchain research, complete with all the tools you need to discover,explore,and visualize vast amounts of blockchain data. We can get data via a sql query and then present data as

  • Bar charts
  • Area Charts
  • Scatter Charts
  • Line Charts
  • Pie Charts
  • Counters
  • Tables

alt image

Sql guides

Before we get into sql. In case you have no background on relational databases like mysql, let's break down what are relational databases.Relational databases contain a set of data tables so that a user can query some combination of tables to get only the subset of data (rows) they need.

alt image

Above is an example of a relational database.
With sql query we can get the data we need fast and efficiently.

Data sets

  • Ethereum
  • Gnosis chain
  • Polygon
  • Optimsm
  • BNB smart chain

Create an dashboards via sql

alt image

WITH token_names as (
select * from
nft."tokens"
)

select name, symbol, count(*) as number_of_nfts
from erc721."ERC721_evt_Transfer" as scam_transfers
join token_names on token_names.contract_address = scam_transfers.contract_address
where scam_transfers."to" = '\x3E0DeFb880cd8e163baD68ABe66437f99A7A8A74'
AND scam_transfers."from" != '\x0000000000000000000000000000000000000000'
group by name, symbol
order by 3 desc
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
sloan profile image
Sloan the DEV Moderator

This looks like a great article! πŸ™Œ

In fact, the topic of your post would also work really well in the Meta Punk Community too!

Metapunk Web3 Community πŸ¦™

We’re a community where blockchain builders and makers, web3 devs, and nft creators can connect, learn and share πŸ¦™

favicon metapunk.to

Meta Punk is a really cool international NFT and web3 community where artists, web3 developers, and traders can connect, learn, and share exciting discoveries and ideas. πŸ¦™

Would you consider posting this article there too? Because Meta Punk is built on the same platform as DEV (Forem) you can fairly easily copy the Markdown and post it there as well.

Really hope that you'll share this awesome post with the community there and consider browsing the other Forem communities out there!