I have a sample table in redshift. I want to generate a report with the month wise data. I found the below three ways so far.
1. trunc(created_at_date) between '2014-06-01' and '2014-06-30';
2. created_at_date like '2014-06%'
3. created_at_date >= '2014-06-01 00:00:00' and created_at_date <= '2014-06-30 23:59:59'
What is the best and optimal way to do so?
Aucun commentaire:
Enregistrer un commentaire