How to list records with date from the last 10 days?

Yes this does work in PostgreSQL (assuming the column “date” is of datatype date)
Why don’t you just try it?

The standard ANSI SQL format would be:

FROM Table 
WHERE date > current_date - interval '10' day;

I prefer that format as it makes things easier to read (but it is the same as current_date - 10).

Leave a Comment