title: OrientDB - Group by date query
body: <p>I'm trying to execute a query in OrientDB to get the number of posts per day. However, my GROUP BY query is failing, and I fail to see what I'm doing wrong.</p>
  
  <p>I have a database filled with 3 Posts, all with a different date. </p>
  
  <p>This is my query:</p>
  
  <pre><code>select
      datePosted.format("dd-MM-yyyy") as day, count(*)
  from
      Post
  group by
      day
  </code></pre>
  
  <p>However, it doesn't work. I would expect it to retrieve a structure with the number of posts per day, but it just retrieves only one result:</p>
  
  <pre><code>[#-2:1{count:3} v0]
  </code></pre>
  
  <p>Any suggestions?</p>