# Ranking argument values for a method call on Ethereum

**URL:** <https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795>\
**Category:** GraphQL API\
**Created:** [January 7, 2022, 6:51am UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795 "2022-01-07T06:51:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![merkleclimber](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@merkleclimber](https://community.bitquery.io/u/merkleclimber)\
**Post date:** [January 7, 2022, 6:51am UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795/1 "2022-01-07T06:51:50Z")

</div>

On an Ethereum ERC20 contract I am trying to rank argument values (‘punkIndex’) by how many times they have been inputted when calling a specific method (‘enterBidForPunk’), but it is only outputting a single value. Any idea what I am doing wrong? See below:

```auto
query ($network: EthereumNetwork!, $address: String!, $method: String!, $limit: Int, $offset: Int, $before: ISO8601DateTime) {
  ethereum(network: $network) {
    arguments(
      smartContractAddress: {is: $address}
      date: {before: $before}
      smartContractMethod: {is: $method}
      height: {gt: 1}
      options: {limit: $limit, offset: $offset}
      
    ) {

      any(of: argument_value, argument: {is: "punkIndex"})
      count
      sender_count: count(uniq: senders)
      max_date: maximum(of: date)
    }
  }
}

```

```auto
{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "address": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
  "method": "enterBidForPunk",
  "before": "2021-12-31T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

```

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [January 7, 2022, 9:18am UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795/2 "2022-01-07T09:18:17Z")

</div>

Try this

> **[calls and unique callers of smart contract call](https://graphql.bitquery.io/ide/calls-and--unique-callers-of-smart-contract-call)**
>
> calls and unique callers of smart contract call

---

<div class="post-metadata">

**Author:** ![merkleclimber](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@merkleclimber](https://community.bitquery.io/u/merkleclimber)\
**Post date:** [January 7, 2022, 9:57am UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795/3 "2022-01-07T09:57:28Z")

</div>

Thanks very much for your reply and the code.

I gave it a try, and it is giving me a count of all the times the enterBidForPunk method was called, as well as (I think) the number of unique callers of the enterBidForPunk method. It is giving me these as a single row output.

To explain myself more clearly, I am trying to generate a distribution of punkIndex by volume (when punkIndex is used as an argument for the enterBidForPunk method). I want to generate data that can show the distribution in a similar form to this ('Distribution of Token Senders By Volume’):

[https://explorer.bitquery.io/ethereum/token/0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb/senders](https://explorer.bitquery.io/ethereum/token/0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb/senders)

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [January 7, 2022, 12:47pm UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795/4 "2022-01-07T12:47:12Z")

</div>

I am not able to understand the requirement, Can you please dm me on Telegram @gaurav\_zen

---

<div class="post-metadata">

**Author:** ![merkleclimber](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@merkleclimber](https://community.bitquery.io/u/merkleclimber)\
**Post date:** [January 8, 2022, 2:33am UTC](https://community.bitquery.io/t/ranking-argument-values-for-a-method-call-on-ethereum/795/5 "2022-01-08T02:33:45Z")

</div>

Ok thanks I have dm’ed you now
