how to use where clause on extract function data postgres code example Example: get year from date postgres SELECT EXTRACT(YEAR FROM column_date);