array_intersect example for NFT

Historical data This query already reads history - it uses the archive dataset, which needs the historical data add-on for this chain. Without the add-on it fails with 'access restricted: your plan only allows realtime'. Drop the dataset argument to fall back to the recent window. Datasets: https:/

By Divyasshree · saved 7 February 2024 · Bitquery API v2

What it returns

The query

# Historical data
#   This query already reads history - it uses the archive dataset, which
#   needs the historical data add-on for this chain.
#
#   Without the add-on it fails with 'access restricted: your plan only allows
#   realtime'. Drop the dataset argument to fall back to the recent window.
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query ($addresses: [String!]) {
  EVM(dataset: archive) {
    Transfers(
      where: {any: [{Transfer: {Sender: {in: $addresses}, Receiver: {notIn: $addresses}}}, {Transfer: {Receiver: {in: $addresses}, Sender: {notIn: $addresses}}}], Transfer: {Currency: {Fungible: false}}}
    ) {
      array_intersect(
        side1: Transfer_Sender
        side2: Transfer_Receiver
        intersectWith: $addresses
      )
    }
  }
}

Variables

{
  "addresses": ["0x7f268357a8c2552623316e2562d90e642bb538e5"]
}

Similar queries