This page describes how to aggregate Kafka data in Lenses SQL Studio.
For a full list of aggregation functions see the SQL Reference.
Count the records
Using the COUNT aggregate function you can count the records in a table. Run the following SQL to see how many records we have on the customers_partitioned:
SELECTCOUNT(*) AS totalFROM customers_partitioned
Use SUM to aggregate your amounts
Using the SUM function you can sum records in a table.
SELECTSUM(quantity * price) AS amountFROM groceries