A series of SQL scripts for Historian Data