1

I have a GridDB database, and I need to perform aggregation operations, such as calculating a column's sum, average, or maximum value. However, I'm unsure how to achieve this using GridDB's SQL syntax.

Here's an example of what I want to achieve:

SELECT category, SUM(quantity) AS total_quantity, AVG(price) AS average_price
FROM my_container
GROUP BY category

In this example, I want to calculate the total quantity and average price for each category in the my_container container. How can I write the equivalent aggregation operations in GridDB's SQL syntax? Are there any specific functions or syntax I should use to perform GridDB aggregations?

SimoIT
  • 79
  • 4
  • I have never used GridDB but I scanned the docs and it looks standard. Do you have some reason to believe your query as written will not work? – Kurt Jun 08 '23 at 20:07
  • What is not working about the SQL statement in your question? – Stu Jun 08 '23 at 21:01
  • I know that GridDB's SQL syntax is different from a traditional SQL statement. That is why I wanted to know if there are any non-supported SQL statements I should avoid! – SimoIT Jun 09 '23 at 19:23

0 Answers0