solana clickhouse error on aggregates
Returns 5000 DEX trades by token on Solana, where currency mint address is J6pQQ3…Mfvd, block time since 2025-09-01 and block time till 2025-10-01, sorted by block timefield: block time, count, sum of trade amount in USD, sum of trade amount and price in USD.
What it returns
- block time
- count
- sum of trade amount in USD
- sum of trade amount
- price in USD
Filters
- currency mint address is J6pQQ3…Mfvd
- block time since 2025-09-01
- block time till 2025-10-01
The query
{
Solana(dataset: combined) {
recent: DEXTradeByTokens(
where: {Block: {Time: {since: "2025-09-01T00:00:00Z", till: "2025-10-01T00:00:00Z"}}, Trade: {Currency: {MintAddress: {is: "J6pQQ3FAcJQeWPPGppWRb4nM8jU3wLyYbRrLh7feMfvd"}}}}
orderBy: {ascendingByField: "Block_Timefield"}
limit: {count: 5000}
) {
Block {
Timefield: Time(interval: {in: minutes, count: 1})
}
trades: count
volumeUsd: sum(of: Trade_AmountInUSD)
volumeBase: sum(of: Trade_Amount)
Trade {
highUsd: PriceInUSD(maximum: Trade_Price)
lowUsd: PriceInUSD(minimum: Trade_Price)
openUsd: PriceInUSD(minimum: Block_Slot)
closeUsd: PriceInUSD(maximum: Block_Slot)
}
}
}
}
Similar queries
- ANSEM daily traders, June 16 to 26, 2026 · Solana · DEXTradeByTokens
- Solana SOL/USDC 1-Minute OHLC with DEXTradeByTokens · Solana · DEXTradeByTokens
- FOMO App: Top Tokens Bought, Last Hour (Solana) · Solana · DEXTradeByTokens
- FOMO App: Most Active Wallets, Last Hour (Solana) · Solana · DEXTradeByTokens
- Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for solana token pair · Solana · DEXTradeByTokens