Querying real-time data
You can process data from both Yandex Object Storage storage systems and Yandex Data Streams data stream buses.
The example below shows how to split input data into one-minute intervals and count the number of events and the total amount within each interval:
SELECT
HOP_END() AS time,
COUNT(*) AS ride_count,
SUM(total_amount) AS total_amount
FROM
(
SELECT
*
FROM
bindings.`tutorial-streaming`
LIMIT 10
)
GROUP BY
HOP(Just(CAST(tpep_pickup_datetime AS Timestamp)), "PT1M", "PT1M", "PT1M");
See also
- SELECT
operator - GROUP BY
operator - HOP operator
- Data aggregation functions