{"id":11663,"date":"2021-08-04T00:00:55","date_gmt":"2021-08-04T07:00:55","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=11663"},"modified":"2025-06-13T19:27:05","modified_gmt":"2025-06-14T02:27:05","slug":"amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/","title":{"rendered":"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics"},"content":{"rendered":"<p><strong>I&#8217;m excited to announce two new powerful data analysis capabilities<\/strong> now available as part of Couchbase Analytics: 1) <code>ROLLUP<\/code> aggregation, and 2) <code>CUBE<\/code> functionality, both to help you aggregate data across multiple document attributes.<\/p>\n<p>The addition of the <code>ROLLUP<\/code> aggregation functionality to <a href=\"https:\/\/docs.couchbase.com\/server\/current\/analytics\/introduction.html?ref=blog\" target=\"_blank\" rel=\"noopener\">the Couchbase Analytics Service<\/a> is part of <a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-server-7-0-release\/?ref=blog\" target=\"_blank\" rel=\"noopener\">the Couchbase Server 7.0 release<\/a>. (We&#8217;ll cover the <code>CUBE<\/code> functionality in an article next week.)<\/p>\n<h2>ROLLUP Aggregation Example: Ecommerce Data<\/h2>\n<p>The <code>ROLLUP<\/code> aggregation function is an extension of the <a href=\"https:\/\/docs.couchbase.com\/server\/current\/analytics\/primer-beer.html?ref=blog#Query_9\" target=\"_blank\" rel=\"noopener\">GROUP BY<\/a> clause.<\/p>\n<p>The <code>ROLLUP<\/code> sub-clause allows you to include extra rows \u2013 commonly referred to as super-aggregate rows \u2013 that represent subtotals in your data along with the grand total row.<\/p>\n<p>For example, let&#8217;s say you have an analytics collection called Sales that tracks ecommerce information for your business. The key data elements you&#8217;re most interested in tracking are country, region\/state, product, quantity and price. (And let&#8217;s say you calculate Sales as Sales = quantity * price.)<\/p>\n<p>Below is a subset of our example ecommerce data collection:<\/p>\n<pre>{\r\n    \"Country\": \"US\",\r\n    \"Region\": \"California\",\r\n    \"Product\": \"Rubber Keyboard\",\r\n    \"Qty\": 1,\r\n    \"Price\": 35.5\r\n  },\r\n  {\r\n    \"Country\": \"US\",\r\n    \"Region\": \"Colorado\",\r\n    \"Product\": \"Gloves\",\r\n    \"Qty\": 4,\r\n    \"Price\": 6.95\r\n  },\r\n {\r\n    \"Country\": \"US\",\r\n    \"Region\": \"Connecticut\",\r\n    \"Product\": \"Cotton Ties\",\r\n    \"Qty\": 2,\r\n    \"Price\": 12.75\r\n}\r\n\u2026\r\n<\/pre>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>Now, let&#8217;s say your users need to determine the following information using the data above:<\/p>\n<p>1) Total sales for all countries and regions<br \/>\n2) Total sales for all regions by country<br \/>\n3) Total sales for each region<\/p>\n<p>The <code>ROLLUP<\/code> aggregation sub-clause is an excellent choice for answering these sorts of data analysis questions. Your data engineer or data analyst simply uses the <a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/?ref=blog\" target=\"_blank\" rel=\"noopener\">N1QL query<\/a> shown below.<\/p>\n<pre class=\"\">SELECT   IFNULL(country,\"All Countries\") Country,\r\n                  IFNULL(region,\"All Regions\") Region,\r\n                  ROUND(SUM(o.qty * o.price),0) Sales\r\nFROM     orders o\r\nWHERE  region LIKE \u201cC%\u201d\r\nLET      country = o.country,  region = o.region\r\nGROUP BY ROLLUP(country, region)\r\nORDER BY country ASC, region ASC, Sales DESC;\r\n<\/pre>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>In the above N1QL query, we use country and region as variables. The <code>ROLLUP<\/code> sub-clause assumes a hierarchy among the specified data attributes.<\/p>\n<p>For example, if the input column is <code>(country, region)<\/code>, the hierarchy <code>country<\/code> is higher or greater than <code>region<\/code>. This is why it makes sense to use <code>ROLLUP<\/code> to generate the subtotals and the grand total for reporting purposes.<\/p>\n<p>Based on the query above, <code>ROLLUP(country, region)<\/code> generates the following results:<\/p>\n<pre>{ \"Country\": \"All Countries\",\r\n    \"Region\": \"All Regions\",\r\n    \"Sales\": 19921991 \r\n},\r\n{ \"Country\": \"US\",\r\n  \"Region\": \"All Regions\",\r\n   \"Sales\": 199219915 \r\n},\r\n{ \"Country\": \"US\",\r\n  \"Region\": \"California\",\r\n  \"Sales\": 6610804\r\n},\r\n{ \"Country\": \"US\",\r\n  \"Region\": \"Colorado\",\r\n  \"Sales\": 6569542 }\r\n {\r\n    \"Country\": \"US\",\r\n    \"Region\": \"Connecticut\",\r\n    \"Sales\": 6741644\r\n  }\r\n...\r\n<\/pre>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>Note that the output is exactly what your example users were originally looking for:<\/p>\n<ol>\n<li>At the top of the results, a grand total summary JSON field shows the total sales of all countries and regions. In these rows, the NULL values in the country and region attributes are transformed to \u201cAll Countries\u201d and \u201cAll Regions\u201d respectively to make the output more readable.<\/li>\n<li>After that, for each country (in this case, the U.S.), an extra subtotal summary JSON data element appears displaying the total sales. In these, values in the region attribute is transformed from NULL to \u201cAll Regions\u201d<\/li>\n<li>Lastly, the output shows the total sales rolled up for each region within the country. In this example, sales for California, Colorado and Connecticut are shown within the U.S.<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>This has been just a quick look at the new <code>ROLLUP<\/code> aggregation feature in the Couchbase Analytics Service. For more information, <a href=\"https:\/\/docs.couchbase.com\/server\/current\/introduction\/whats-new.html?ref=blog#rollup-and-cube-extensions-to-group-by\" target=\"_blank\" rel=\"noopener\">check out the <code>ROLLUP<\/code> documentation<\/a>. I hope you find this new capability useful for future data analysis projects at your enterprise.<\/p>\n<p>I look forward to <a href=\"https:\/\/www.couchbase.com\/forums\/?ref=blog\" target=\"_blank\" rel=\"noopener\">your feedback on the Couchbase Forums<\/a> \u2013 let us know what you think!<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 30px\" aria-hidden=\"true\"><\/div>\n<div style=\"text-align: center\"><strong>You don&#8217;t have to take my word for it: Take Couchbase Analytics for a spin today&lt;br\/ &gt;<a href=\"https:\/\/www.couchbase.com\/downloads\/?ref=blog\" target=\"_blank\" rel=\"noopener\">Give Couchbase a Test Drive<\/a><\/strong><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m excited to announce two new powerful data analysis capabilities now available as part of Couchbase Analytics: 1) ROLLUP aggregation, and 2) CUBE functionality, both to help you aggregate data across multiple document attributes. The addition of the ROLLUP aggregation [&hellip;]<\/p>\n","protected":false},"author":58630,"featured_media":11665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,2294,1816,1812],"tags":[2014,2155,9354,1261,9353],"ppma_author":[8967],"class_list":["post-11663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-analytics","category-couchbase-server","category-n1ql-query","tag-data-analysis","tag-ecommerce","tag-group-by","tag-json","tag-super-aggregate-rows"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Data Analysis with ROLLUP Aggregation in Couchbase Analytics<\/title>\n<meta name=\"description\" content=\"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics\" \/>\n<meta property=\"og:description\" content=\"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-04T07:00:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T02:27:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service-social.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"418\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Idris Motiwala\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service-social.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Idris Motiwala\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\"},\"author\":{\"name\":\"Idris Motiwala\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/2fc07a18d91ce2e4e0f1f7c5c9e620b8\"},\"headline\":\"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics\",\"datePublished\":\"2021-08-04T07:00:55+00:00\",\"dateModified\":\"2025-06-14T02:27:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\"},\"wordCount\":513,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg\",\"keywords\":[\"Data Analysis\",\"ecommerce\",\"GROUP BY\",\"JSON\",\"super-aggregate rows\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Analytics\",\"Couchbase Server\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\",\"name\":\"Data Analysis with ROLLUP Aggregation in Couchbase Analytics\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg\",\"datePublished\":\"2021-08-04T07:00:55+00:00\",\"dateModified\":\"2025-06-14T02:27:05+00:00\",\"description\":\"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg\",\"width\":1200,\"height\":628,\"caption\":\"Talend adds Couchbase Capella connector support\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/2fc07a18d91ce2e4e0f1f7c5c9e620b8\",\"name\":\"Idris Motiwala\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/28d4b56674680cd3d7fe940321c3e98a\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/41b4ee771dab1b1ff8152be7b5545a13ff3cca8ca7e9021e762e3d7af21763f0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/41b4ee771dab1b1ff8152be7b5545a13ff3cca8ca7e9021e762e3d7af21763f0?s=96&d=mm&r=g\",\"caption\":\"Idris Motiwala\"},\"description\":\"Idris is a Principal Product Manager, Analytics at Couchbase with 20+ years experience in design, development and execution of software products at both Fortune 500s and startups leading teams in digital transformation, cloud and analytics. Idris holds an MS in Technology Management and certifications in product management .\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/idrismotiwala\/\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/idris-motiwala\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Data Analysis with ROLLUP Aggregation in Couchbase Analytics","description":"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/","og_locale":"en_US","og_type":"article","og_title":"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics","og_description":"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.","og_url":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/","og_site_name":"The Couchbase Blog","article_published_time":"2021-08-04T07:00:55+00:00","article_modified_time":"2025-06-14T02:27:05+00:00","og_image":[{"width":800,"height":418,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service-social.jpg","type":"image\/jpeg"}],"author":"Idris Motiwala","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service-social.jpg","twitter_misc":{"Written by":"Idris Motiwala","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/"},"author":{"name":"Idris Motiwala","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/2fc07a18d91ce2e4e0f1f7c5c9e620b8"},"headline":"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics","datePublished":"2021-08-04T07:00:55+00:00","dateModified":"2025-06-14T02:27:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/"},"wordCount":513,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg","keywords":["Data Analysis","ecommerce","GROUP BY","JSON","super-aggregate rows"],"articleSection":["Best Practices and Tutorials","Couchbase Analytics","Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/","url":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/","name":"Data Analysis with ROLLUP Aggregation in Couchbase Analytics","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg","datePublished":"2021-08-04T07:00:55+00:00","dateModified":"2025-06-14T02:27:05+00:00","description":"Walk through an example of the new ROLLUP sub-clause feature in Couchbase Analytics to help you aggregate data across multiple JSON document attributes.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2021\/08\/data-analysis-rollup-aggregation-function-couchbase-analytics-service.jpg","width":1200,"height":628,"caption":"Talend adds Couchbase Capella connector support"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/amp-up-your-data-analysis-with-the-new-rollup-aggregation-in-couchbase-analytics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Amp Up Your Data Analysis with the New ROLLUP Aggregation in Couchbase Analytics"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/2fc07a18d91ce2e4e0f1f7c5c9e620b8","name":"Idris Motiwala","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/28d4b56674680cd3d7fe940321c3e98a","url":"https:\/\/secure.gravatar.com\/avatar\/41b4ee771dab1b1ff8152be7b5545a13ff3cca8ca7e9021e762e3d7af21763f0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/41b4ee771dab1b1ff8152be7b5545a13ff3cca8ca7e9021e762e3d7af21763f0?s=96&d=mm&r=g","caption":"Idris Motiwala"},"description":"Idris is a Principal Product Manager, Analytics at Couchbase with 20+ years experience in design, development and execution of software products at both Fortune 500s and startups leading teams in digital transformation, cloud and analytics. Idris holds an MS in Technology Management and certifications in product management .","sameAs":["https:\/\/www.linkedin.com\/in\/idrismotiwala\/"],"url":"https:\/\/www.couchbase.com\/blog\/author\/idris-motiwala\/"}]}},"authors":[{"term_id":8967,"user_id":58630,"is_guest":0,"slug":"idris-motiwala","display_name":"Idris Motiwala","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/41b4ee771dab1b1ff8152be7b5545a13ff3cca8ca7e9021e762e3d7af21763f0?s=96&d=mm&r=g","author_category":"","last_name":"Motiwala","first_name":"Idris","job_title":"","user_url":"","description":"Idris is a Principal Product Manager, Analytics at Couchbase with 20+ years experience in design, development and execution of software products at both Fortune 500s and startups leading teams in digital transformation, cloud and analytics. Idris holds an MS in Technology Management and certifications in product management ."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/11663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/58630"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=11663"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/11663\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/11665"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=11663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=11663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=11663"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=11663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}