Check out example codes for "DATE_SUB postgres". It will help you in understanding the concepts better.

Code Example 1

-- MySQL
DATE_SUB(NOW(), INTERVAL '1 YEAR')
-- PostgreSQL
(NOW() - INTERVAL '1 YEAR')

Learn ReactJs, React Native from akashmittal.com