Forum Discussion
Anonymous
6 years agoNot applicable
Stream analytics job with iot hub data
Hi Team
I have the following query in azure database, this query retrieves two sensors data namely; temp and illuminance. I am struggling to get a field 'date' to retrieve current date time stamp. I need help as to how to go about using this syntax in my below query?
DO i need to use DATEDIFF() function? Any ideas to improve my query below please show me and guide me, thanks.
SELECT illuminance as illuminance, temperature as temperature, MAX(CAST([timeStamp] AS datetime)) AS Date INTO [PowerBIVisualizationOutput] FROM [PowerBIVisualizationInput] GROUP BY illuminance, temperature, TumblingWindow(minute,5)
No Replies