postgresql query with time difference -


i have table structure follows

id name point last_updated refresh_frequency 1 'abc' 100 2015-08-28 01:00:00 24 

last_updated datetime field , refresh_frequency int

i want rows having last_updated value before refresh_frequency (in hours) current time, how write query this?

select * tablename last_updated < now() - refresh_frequency * interval '1 hour'; 

Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -