Today I Learned

TIL, 2017-10-01, Aggregate Pomodoros

  • SELECT date_trunc('day', pomodoros.created_at::DATE) AS date_created, SUM(pomodoros.duration) as total_duration FROM pomodoros GROUP BY date_created ORDER BY date_created DESC
  • Pomodoro.connection.select_rows to grab a hash or grab the rows, faster than all. Reference
  • I18n is not that hard, I think just the process of how you structure the yml will be the hard part.

This project is maintained by daryllxd