Oracle group by date, month and year
<p>I have the below query to show me the count for each country group by single days such as 20160101.</p>

<p>How can I modify the below query so it can group by date, month and year?</p>

<p>Please note currently working on an Oracle database.</p>

<p>Many Thanks in advance.</p>

<pre><code>Select count(1), country_of_sale, substr(datefield,1,8) AS datefield1
from table 
where country_of_sale IN (‘USA’,’EUROPE’,’ASIA’)
group by country_of_sale, substr(datefield,1,8)
order by substr(datefield,1,8)
</code></pre>