Check out the Meta Data Source, I'm pretty sure that it has the functions you are looking for. The SQL module is meant to connect to an external database. With the Meta Data Source you can return the value of a point from the history and also apply scripts to its along with many other features.
Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
S