Window Functions
# StreamSQL Window Functions
Window functions provide window-related information.
# WINDOW_START - Window Start Time
Syntax: window_start()
Description: Returns the start time of the current window.
Incremental Calculation: ✅ Supported
Example:
SELECT device, window_start() as window_begin, avg(temperature) as avg_temp
FROM stream
GROUP BY device, TumblingWindow('10s')
1
2
3
2
3
# WINDOW_END - Window End Time
Syntax: window_end()
Description: Returns the end time of the current window.
Incremental Calculation: ✅ Supported
Example:
SELECT device, window_end() as window_finish, avg(temperature) as avg_temp
FROM stream
GROUP BY device, TumblingWindow('10s')
1
2
3
2
3
# 📚 Related Documentation
- Aggregate Functions - Learn detailed usage of aggregate functions
- Analytical Functions - Learn detailed usage of analytical functions
- SQL Reference - View complete SQL syntax reference
Edit this page on GitHub (opens new window)
Last Updated: 2026/07/11, 12:44:39