# Symptom Stats

Use the `symptomStats` to retrieve statistics for symptoms logged by the user within a specified date range.

### Required Arguments

| Argument | Type      | Description                                                        |
| -------- | --------- | ------------------------------------------------------------------ |
| `start`  | DateTime! | The starting date for the date range. Use the format: `YYYY-MM-DD` |
| `end`    | DateTime! | The end date for the date range. Use the format: `YYYY-MM-DD`      |

### Available Fields

| Field Name  | Type    | Description                                      |
| ----------- | ------- | ------------------------------------------------ |
| `symptomId` | ID      | Symptom Id.                                      |
| `symptom`   | Symptom | [Symptom](../../../../objects/symptoms/symptom). |
| `count`     | Int     | Number of times the symptom was reported.        |
| `total`     | Float   | Total value accumulated for the symptom.         |
| `average`   | Float   | Average value of the symptom reports.            |
| `min`       | Float   | Minimum value reported for the symptom.          |
| `max`       | Float   | Maximum value reported for the symptom.          |

### Example

{% tabs %}
{% tab title="Request" %}
```graphql
query{
  symptomStats(start:"2025-07-02" end:"2025-07-04"){
    symptomId
    symptom{
      id
      name
    }
    count
    total
    average
    min
    max
  }
}
```
{% endtab %}

{% tab title="Response" %}
```graphql
{
  "data": {
    "symptomStats": [
      {
        "symptomId": "U3ltcHRvbTozNGNlYjBkZC05ZTg4LTQ0OWYtODcwNC05ZjJlMmU2MGRiNDE=",
        "symptom": {
          "id": "U3ltcHRvbTozNGNlYjBkZC05ZTg4LTQ0OWYtODcwNC05ZjJlMmU2MGRiNDE=",
          "name": "Bloating"
        },
        "count": 3,
        "total": 10,
        "average": 3.3333333333333335,
        "min": 2,
        "max": 5
      }
    ]
  }
}
```
{% endtab %}
{% endtabs %}
