Curriculum·G101 Querying On-Chain Data·about 30 min

Aggregating with SQL and Dune

By the end of this lesson you can

  • Explain what aggregation does: turn millions of individual events into a pattern by grouping and counting
  • Explain how aggregating trades by counterparty exposed the wash trading that inflated LooksRare's volume
  • Compute a wash-trading signal by grouping volume by trading pair and comparing to distinct participants
  • Choose the grouping that answers your question rather than reading raw totals

Graduate · enrolled learners

This lesson opens with LooksRare wash trading, January 2022.

What happened
LooksRare launched in January 2022 as an NFT marketplace that paid its LOOKS token to users in proportion to trading volume. The incentive was gamed almost immediately: traders sold NFTs back and forth between wallets they controlled, paying only fees to themselves, purely to generate volume and farm the reward. Reported volume briefly exceeded that of the market leader, running into the billions of dollars, and taken at face value it looked like an overnight giant. Aggregating the trades told the real story: grouping volume by trading pair and by counterparty showed a small number of wallets trading the same high-value NFTs with each other over and over, so that a huge fraction of the reported volume was the same value circling between related addresses rather than genuine economic activity. No individual trade was hidden; the pattern was only visible once the millions of events were grouped and counted.
The decision point
The LooksRare volume was a true number and a false impression at once. Every trade was real and on-chain, so the raw total was correct, and the raw total was also worthless as a measure of genuine demand, because most of it was value circling between the same hands. The gap between the two is closed by aggregation: the analyst does not read the headline total, they group the events by a dimension that answers the question, counterparty, pair, distinct participants, and count. Grouped by counterparty, the wash trading is obvious; read as a headline, it is a record-breaking marketplace. This is the third analyst skill after knowing the chain is evidence and reading its schema: turning millions of individual, honest events into a pattern by choosing the right grouping, because the answer is almost never in the raw total and almost always in how you slice it.

What you will be able to answer

  • How was LooksRare volume inflated, and how was it caught?
  • What does aggregation do?
  • How do you test whether volume reflects real demand?
  • Why was LooksRare's total both true and misleading?

Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.

It is free. We do not sell the list and there is nothing to buy at the end of it.

Sources and review

Confidence high·Volatility medium·Reviewed 2026-09-15·Owner unassigned

Contested

Estimates of the wash-traded share of LooksRare's early volume vary widely across analyses but consistently find a large majority of reported volume was self-directed. The exact percentage depends on the wash-trading definition used.

The lesson uses LooksRare to teach aggregation; the specific groupings named (counterparty, pair, distinct participants) are standard analytic slices, not a single published query.