Here instead of using 7 days interval, I want to use days_gap in a function and pass a numeric value to it instead of a hardcoded value. And then directly call it in the SELECT function
SELECT BOO_NUMBER,
ROO_NUMBER
FROM BOO B
WHERE B.FOO < CURRENT_TIMESTAP - '7 days'::interval
Instead of using '7 days'::interval I want to use a function days_gap which takes a numeric value in the function and can be called respectively instead of 7 days interval.
Please help me with the function code to be called in the select query.
Thanks in advance!