Btw if you are dealing with datetime, please check out these before investing unnecessary time into fragments() like I did
- Aggregates:
count/0,count/1,avg/1,sum/1,min/1,max/1 - Date/time intervals:
datetime_add/3,date_add/3,from_now/2,ago/2
Intervals
Ecto supports following values for interval option: "year", "month", "week", "day", "hour", "minute", "second", "millisecond", and "microsecond".
Date/Time functions like datetime_add/3, date_add/3, from_now/2, ago/2 take interval as an argument.
All of these will execute on the SQL server and use the native underlying functions






















