Postgresql, Now, compare timestamps. From: http://stackoverflow.com/questions/17997990/sql-get-all-records-older-than-30-days
SELECT * FROM user_states where pro_app_installed_at >= NOW() - INTERVAL '1 day';