Below the grafana query, used Generate SQL tab.
SELECT created_at AS “time”, asset_price AS metric, value FROM DT WHERE created_at BETWEEN FROM_UNIXTIME(1588766352) AND FROM_UNIXTIME(1588939153) ORDER BY created_at;
Erros:
1 - value - this column does not exist
2 BETWEEN FROM_UNIXTIME(1588766352) - i tried direct query at mysql and only works with brackets - BETWEEN FROM_UNIXTIME(‘1588766352’)
This is my direct mysql query: works fine with below changes
SELECT created_at AS “time”, asset_price AS metric FROM DT WHERE created_at BETWEEN FROM_UNIXTIME(‘1588766352’) AND FROM_UNIXTIME(‘1588939153’) ORDER BY created_at;
| 2020-05-07 21:49:16 | 46.35 |
| 2020-05-07 21:49:16 | 9.78 |
| 2020-05-07 21:49:16 | 39.20 |
| 2020-05-07 21:49:16 | 78.619 |
±--------------------±--------+
4508 rows in set (0.01 sec)
my mysql version is 5.7
any idea how to overcome this problem??
Best Regards
Jeverson