Stream Analytics with Microsoft Azure
上QQ阅读APP看书,第一时间看更新

Declarative SQL constructs

A simple-to-use UI is provided and queries can be constructed using the provided user interface. The following is the feature set of the declarative SQL constructs:

  • Filters (Where)
  • Projections (Select)
  • Time-window and property-based aggregates (Group By)
  • Time-shifted joins (specifying time bounds within which the joining events must occur)
  • All combinations thereof

The following is a summary of different constructs to manipulate streaming data:

  • Data manipulation: SELECT, FROM, WHERE GROUP BY, HAVING, CASE WHEN THEN ELSE, INNER/LEFT OUTER JOIN, UNION, CROSS/OUTER APPLY, CAST, INTO, ORDER BY ASC, DSC
  • Date and time functions: DateName, DatePart, Day, Month, Year, DateDiff, DateTimeFromParts, DateAdd
  • Temporal functions: Lag, IsFirst, LastCollectTop
  • Aggregate functions: SUM, COUNT, AVG, MIN, MAX, STDEV, STDEVP, VAR VARP, TopOne
  • Mathematical functions: ABS, CEILING, EXP, FLOOR POWER, SIGN, SQUARE, SQRT
  • String functions: Len, Concat, CharIndex Substring, Lower Upper, PatIndex
  • Scaling extensions: WITH, PARTITION BY OVER
  • Geospatial: CreatePoint, CreatePolygon, CreateLineString, ST_DISTANCE, ST_WITHIN, ST_OVERLAPS, ST_INTERSECTS