# Como agrupar apenas por data no Data Explorer

**URL:** <https://meta.discourse.org/t/how-to-group-by-date-only-in-data-explorer/92868>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [Julho 22, 2018, 4:45am UTC](https://meta.discourse.org/t/how-to-group-by-date-only-in-data-explorer/92868 "2018-07-22T04:45:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [Julho 22, 2018, 8:23am UTC](https://meta.discourse.org/t/how-to-group-by-date-only-in-data-explorer/92868/6 "2018-07-22T08:23:49Z")

</div>

@John_Waltrip1, here’s the query I think you’re looking for. I switched to DAY, which is the day of the month, which seems easier for most humans that I know to understand than the day of the year (DOY).

```sql
select count(*), 
      EXTRACT(DAY FROM created_at) as day
from users
where created_at > LOCALTIMESTAMP - INTERVAL '14 days'
and admin = false
group by day
order by day desc

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-group-by-date-only-in-data-explorer/92868)._
