Historical data widget displays historical data in a column, line or area graph. SQL statement is expected to return two columns. The first column should have dates, second one should have values.
In the following example, SQL statement retrieves shares price for Apple.
SELECT date, price FROM stock WHERE ticker="AAPL"
Make sure you sort results by date. Sequence of returned data raws is important. The platform will display first 1000 rows that it retrieves.