postgresql extract code example
Example 1: postgresql get year
select extract(year from your_column) from your_table;
Example 2: postgresql today - 1 year
select now() - INTERVAL '1 YEAR';
select extract(year from your_column) from your_table;
select now() - INTERVAL '1 YEAR';