# Simple count and date graph

**URL:** <https://community.grafana.com/t/simple-count-and-date-graph/1532>\
**Category:** Grafana\
**Created:** [June 26, 2017, 7:14am UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532 "2017-06-26T07:14:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![almantas](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@almantas](https://community.grafana.com/u/almantas)\
**Post date:** [June 26, 2017, 7:14am UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532/1 "2017-06-26T07:14:23Z")

</div>

Hi,  
I have following table: ![](https://us1.discourse-cdn.com/grafana/original/1X/8d6bf52de779ce261d924397b4999e4ad0b67faa.JPG)

I want to create graph with

1. StatDate as time\_sec
2. Sum of particular status for particular date as value
3. Different status values as metric  
For example, on day 2017-02-21 2 orders shipped (SHIP), on 2017-02-22 15 orders shiped (SHIP) and so on. Then other metric for errors (ERR) and so on.  
Is it possible to do that?

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [June 26, 2017, 7:32am UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532/2 "2017-06-26T07:32:39Z")

</div>

yes it’s possible.

Look at the example time series query for graph panel for help (new graph panel, or new query has the example query).

Otherwise I suggest reading SQL query language docs & examples 🙂

---

<div class="post-metadata">

**Author:** ![almantas](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@almantas](https://community.grafana.com/u/almantas)\
**Post date:** [June 26, 2017, 8:44am UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532/3 "2017-06-26T08:44:11Z")

</div>

I have used GROUP BY, changed time range to 10 days. But no data is displayed. MySQL returns date as in picture in previous post.

 ![](https://us1.discourse-cdn.com/grafana/original/1X/e1ddb610f915ca4b3b97e80d824df9854ce1c045.JPG)

---

<div class="post-metadata">

**Author:** ![almantas](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@almantas](https://community.grafana.com/u/almantas)\
**Post date:** [June 26, 2017, 11:04am UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532/4 "2017-06-26T11:04:10Z")

</div>

Grafana somehow returns 0 values of COUNT function, MySQL side returned correct values.

 ![](https://us1.discourse-cdn.com/grafana/original/1X/9b20de44b0efb93930beb83bbe1ad64311644c73.JPG)

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [July 4, 2017, 3:45pm UTC](https://community.grafana.com/t/simple-count-and-date-graph/1532/5 "2017-07-04T15:45:31Z")

</div>

Your query should return a column named value not number
