We always need to fetch some latest records from database and we often forget the query or too lazy to write it ourself and we search something like "How to list records with date from the last 10 days?", or "Records between today and last 30 days" silly :D

Heres' the PostgreSQL snippet for you to copy paste. Happy copy pasting.