Grafana Dashboard on MSSQL and Windows platform

Hello All,
I am very new to Grafana, struggling to make my first dashboard on MSSQL. I have written following code for making my first time series panel.
SELECT
$__timeEpoch(T_DATE),
VALUE_NAME as value,
PARAMETER column> as metric
FROM
TB_TEST
WHERE
$__timeFilter(T_DATE)
ORDER BY
T_DATE ASC
but getting error. Can someone guide me please.

Welcome

Would help if you posted the error as we do not have access to your grafana :wink:

Thanks a lot for your response, Since I am new to Grafana getting stuck in every step. However I would be of great help if you can support me in following two points.

  1. I have made a time series plot using following code
    “SELECT
    $__timeEpoch(T_DATE),
    VALUE as value,
    PARAMETER as metric
    FROM
    TB_TEST
    WHERE
    $__timeFilter(T_DATE) AND PARAMETER = ‘ENG_RPM’
    ORDER BY
    T_DATE ASC”
    Now I want to make this PARAMETER field dynamic, e.g there should be a dropdown panel where user will select any parameter of their choice and same will be plotted.
  2. I have used a stat visualization to show total number of distinct records in a column using following code
    SELECT COUNT(DISTINCT(ENGINE_NO)) from TB_TEST
    it is working fine if we use format as Table but if we want to use format as time series it is not working. As a result irrespective of my time window selection the stat value is remaining unchanged.
    Thanks

i guess you resolved your original issue?

  1. wherever ENG_RPM is coming from you need to create a variable that queries the source of that data or create a manual list. for that read this
    Templates and variables | Grafana documentation
  2. SELECT COUNT(DISTINCT(ENGINE_NO)) from TB_TEST
    there is no time column to plot here so time series wont work