I need to match, as best as possible, the following Azure Application Insights query to a query for a local IIS log file using IIS Log Parser.
Kusto Query for AppInsights:
requests
| where timestamp between(todatetime('2019-05-06T15:15:00.000')..todatetime('2019-05-06T15:22:00.000'))
| order by timestamp desc
| summarize count() by url
| order by count_
IIS Log Query Code:
SELECT cs-uri-stem as Url,
FROM 'C:\users\xxxx\Documents\u_ex'
WHERE to_time(time)
BETWEEN TIMESTAMP ('15:15:00','hh:mm:ss') AND TIMESTAMP('15:22:00','hh:mm:ss')
AND DATE = '2019-05-06'
COUNT(*) As Hits
GROUP BY cs-uri-stem
ORDER By Hits DESC
Error I get in IIS query:
Error parsing query: Syntax Error: : expecting FROM keyword instead of token C:\users\xxxx\Docments\u+ex190506.log" [SQL query syntax invalid or unsupported.]