Sqlt_data {variable} t_stamp

Hello, how can I make a query that search in all registers?
Should i make a variable for year and month?

Use the tag history binding. It uses all appropriate tables for the time range you give it.

1 Like

Is not any way to do it with SQL?

Not in a single binding, no. You would need to use a union that repeats your query as many times as time ranges indicate. Complicated. Tag history bindings and functions do this for you.

How can we make a time filter in that case? for example just sow the register between 0 am to 8 am?

Tag History Bindings allow you to specify the date/time start and end.

I mean, to filter every day the data range. If i select one data range(1 week), and i just want to see some hour at day(2pm to 3pm). I have made other filters abiables in the table but this as i understand is more easy to make in SQL, how can i make in the tag history bildings?

I would use a history binding for the full time span on a custom component and then post-process that dataset to apply the additional conditions. Naturally, I would use my own view() expression function for the post-processing. (:

I was doing that, make some variables to filter in a table. but is a manual work…
Thanks any how. :grinning: