Hello Guys,
I prepared some sql queries but i’m really struggling while converting to grafana mssql query.
There is not counterpart in grafana for some sql functions or i can’t find it in official doc pages. Please tell me how can i convert all of sql flexibility to grafana
For instance query:
select DATEADD(MINUTE , -5, GetDate()) as DATE,
CASE
WHEN ChannelID=1 THEN ‘X1’
WHEN ChannelID=2 THEN ‘X2’
WHEN ChannelID=11 THEN ‘X3’
END as Channel,
count(*) as count
from [LOGTABLE] with (nolock) where (TransactionName =‘T1’ or TransactionName=‘T2’)
and [Date] > DATEADD(MINUTE , -5, GetDate())
group by ChannelID
By the way I’m new on Grafana.
Thanks in advance.
Regards,
Serdar