Counting specific transaction data in specific smart contract method call

Bitquery is amazing, just started experimenting around two days ago and got one small issue. Using to query some Avalanche data.

I’m currently using the following code to count calls of a smart contract
smartContractAddress: {is: $address}
while filtering one specific method
smartContractMethod: {is: "a47d9d33"}

the whole code looks like this

query ($network: EthereumNetwork!, $address: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    smartContractCalls(
      options: {desc: "count", limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      smartContractAddress: {is: $address}
      smartContractMethod: {is: "a47d9d33"}
    ) {
      address: caller {
        address
        annotation
      }
      max_date: maximum(of: date)
      count
      gasValue(calculate: average)
    }
  }
}

and additional data:

{
  "limit": 10,
  "offset": 0,
  "network": "avalanche",
  "address": "0x1d34b421a5ede3e300d3b8bcf3be5c6f45971e20",
  "nativeCurrency": "AVAX",
  "from": "2022-02-10",
  "till": "2022-03-11T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

How can I “filter” even more?

Example transaction (on Avalanche)
0xf17f3fdabd91e2969c52590f7296bf9f2b2eb6f1dc8ba5ff2c8a071ca7c6a77b

It is possible to filter for the method and count that, however, in this case I need to count by filtering the input data.

The input data in this case is:

The 1 at the end of line [3] is important to count. If there are only zeros in [3] it should not count the call.

Is it possible to dive even further and count or write down the quantity of each of those calls - this info is in [2].

Appreciate any help.

Thank you!

Can you show the data in our explorer

Unfortunately, the query does only count the method calls per day, however, filtering further to the input data would be very useful. How can I add this to the query?

Query link: Count of ALOT orders per day (bitquery.io)

I do not understand your question

Sorry for my misarticulation.

If you check this transaction: 0xf17f3fdabd91e2969c52590f7296bf9f2b2eb6f1dc8ba5ff2c8a071ca7c6a77b

You can see that it has input data in this format

How can I change my query in a way that it does not count every call of the method a47d9d33

(as it is done currently with)

smartContractMethod: {is: "a47d9d33"}

but to count every transaction with method a47d9d33 and input data tradepaidId is: “0x415641582f555344542e65000000000000000000000000000000000000000000”

I need to differentiate between several calls of this smart contract with this method a47d9d33 using the input data.

push, maybe someone can help

The argument api usually works, but we are facing some troubles in avalanche in particular. We have reported it to our development team. They will look into it. Here are some examples of arguments api:

  1. Aggregate Smart contract Argument
  2. Filtered arguments
  3. Transaction Arguments