How to group rows by time in PostgreSQL (and in Django) 2 years ago 2 min read djangopythonsqlpostgresqltutorial Sometimes you need to group rows by a time interval, say, one value per minute, or per hour. In this post I will share how you can achieve it with vanilla PostgreSQL and