Hi
This query will return the interpolated value at 9 AM, and the status column indicates this:
Negative – digital state code; zero – good value indication; positive – integer point value
SELECT tag, time, value, status FROM piarchive..piinterp2 WHERE tag = 'sinusoid' AND time BETWEEN 't-30d' AND 't' AND timestep = '24h'
A digital state code almost always indicated a bad value!