How to get one results per currency for LP query

Hello,
I am trying to pull the busiest wallet from each currency below. Is there a way to do a limitby so only one wallet per currency shows up?

{
  ethereum(network: bsc) {
    transfers(
      currency: {in: ["0xf745a5b5A5e945642972b9a4DD711BFd13eB7727", "0x1c47dbc6036dfabd5c5b2ed066a1661a267322a9", "0x7793123b0f2e78BeB0d75D9E0A936d30959268C2"]}
      options: {desc: "receiver_count", limit: 15, limitBy: {each: "currency.address", limit: 1}}
    ) {
      sender {
        address
        annotation
      }
      currency {
        symbol
      }
      amount
      count
      receiver_count: count(uniq: receivers)
      max_amount: maximum(of: amount, get: amount)
      max_date: maximum(of: date)
    }
  }
}

Try this

 {
  ethereum(network: bsc) {
    transfers(
      currency: {in: ["0xf745a5b5A5e945642972b9a4DD711BFd13eB7727"]}
      options: {desc: "receiver_count", limit: 15, limitBy: {each: "currency.symbol", limit: 1}}
    ) {
      sender {
        address
        annotation
      }
      currency {
        symbol
      }
      amount
      count
      receiver_count: count(uniq: receivers)
      max_amount: maximum(of: amount, get: amount)
      max_date: maximum(of: date)
    }
  }
}
2 Likes