psql query get all data of last each 6 months code example
Example 1: last 6 months postgresql
CURRENT_DATE - INTERVAL '6 months'
Example 2: postgres select from last 3 months
SELECT * from table where date > CURRENT_DATE - INTERVAL '3 months'
CURRENT_DATE - INTERVAL '6 months'
SELECT * from table where date > CURRENT_DATE - INTERVAL '3 months'