{"id":2101,"date":"2016-01-05T18:03:32","date_gmt":"2016-01-05T18:03:32","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2101"},"modified":"2025-06-13T19:30:33","modified_gmt":"2025-06-14T02:30:33","slug":"n1ql-vs-tsql-processing-aggregations","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/n1ql-vs-tsql-processing-aggregations\/","title":{"rendered":"N1QL vs TSQL - Agregaciones con Couchbase Server vs SQL Server"},"content":{"rendered":"<p>SQL existe desde hace much\u00edsimo tiempo. Es una forma muy intuitiva y eficiente de procesar datos estructurados y ha sido la elecci\u00f3n para las bases de datos durante muchos a\u00f1os. Sin embargo, con el mundo de BIG DATA, los datos se han <em>velocidad<\/em>, <em>variedad <\/em>y <em>volumen<\/em>. SQL puede abordar los 2 \"<em>v<\/em>\"Est\u00e1 bien con las optimizaciones: \"<em>velocidad<\/em>\" y \"<em>volumen<\/em>\". De hecho, muchos nuevos dielectos de SQL (N1QL, Spark, U-SQL, Impala, Drill y m\u00e1s) est\u00e1n haciendo exactamente eso. Sin embargo, \"<em>variedad<\/em>\"es otro juego. Los Big Data son complejos en el nuevo mundo; tienen un esquema impredecible, en constante evoluci\u00f3n, irregular, valores dispersos y estructuras profundamente anidadas. \u00a1Para eso SQL necesita ampliarse!<\/p>\n<p>Bueno, \u00a1estoy s\u00faper emocionado de informar que hemos construido N1QL en Couchbase Server 4 para abordar exactamente estos problemas! N1QL puede recorrer f\u00e1cilmente las estructuras complejas en JSON (el est\u00e1ndar de serializaci\u00f3n de-facto para datos complejos). Usando N1QL, puedes trabajar no s\u00f3lo con NULLs sino tambi\u00e9n con atributos que son <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.1\/n1ql\/n1ql-language-reference\/literals.html\">FALTA<\/a> en varias formas de JSON que procesas. O puede utilizar operadores como <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.1\/n1ql\/n1ql-language-reference\/collectionops.html\">CUALQUIERA<\/a> para consultar matrices incrustadas en documentos JSON. O puede utilizar comandos como <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.1\/n1ql\/n1ql-language-reference\/from.html\">UNNEST &amp; NEST<\/a> que puede acoplar o desacoplar matrices anidadas. Hay demasiadas de estas potentes extensiones para contarlas aqu\u00ed, as\u00ed que no lo har\u00e9. En su lugar voy a mostrar una joya escondida que fue publicada originalmente <a href=\"https:\/\/stackoverflow.com\/questions\/34117559\/obtaining-last-revisions-in-couchbase-with-n1ql\/34122200#34122200\">aqu\u00ed<\/a> por Gerald. Esta gema es muy \u00fatil con agregados si est\u00e1 utilizando N1QL. vs una base de datos relacional como SQL Server.<\/p>\n<p>Una de las grandes ventajas de N1QL es su capacidad para entender los tipos de array. Las funciones de agregaci\u00f3n como MAX() no son revolucionarias pero con las adiciones de anidamiento y arreglos, algo tan simple como MAX() puede ser super poderoso. Una nota antes de entrar en materia - Voy a escoger TSQL y SQL Server ya que contribu\u00ed a TSQL en mi vida pasada en Microsoft. Sin embargo, esto es aplicable a Oracle, Postgres, Mysql, Informix o DB2 y m\u00e1s ... Ok as\u00ed: Imag\u00ednese tratando de encontrar atributos del producto que tiene el precio MAX. En SQL Server que es bastante simple consulta a escribir utilizando TSQL;<\/p>\n<pre><code class=\"language-sql\">SELECT productID, name FROM t1\r\nWHERE price = (SELECT MAX(price) FROM t1)\r\nGO<\/code><\/pre>\n<p>As\u00ed est\u00e1 bien. Aqu\u00ed est\u00e1 el resultado - el producto con el precio m\u00e1s alto es el producto llamado \"c\" con ID 3.<\/p>\n<pre><code class=\"language-bash\">productID            name\r\n-----------          -----------------------------------------------------------------\r\n3                    c\r\n<\/code><\/pre>\n<p>Este es el aspecto del plan de ejecuci\u00f3n. B\u00e1sicamente, el plan de ejecuci\u00f3n busca el valor de precio MAX. Una vez que tiene el valor, es un bucle anidado join para buscar los otros atributos del producto en la tabla como productID y name.<\/p>\n<pre><code class=\"language-bash\">Stmt Text\r\n---------------------------------------------------------------------------------------------\r\nselect productID, name from t1 where price = (select max(price) from t1)\r\n  |--Nested Loops(Inner Join, WHERE:([Expr1004]=[test].[dbo].[t1].[price]))\r\n       |--Stream Aggregate(DEFINE:([Expr1004]=MAX([test].[dbo].[t1].[price])))\r\n       |    |--Clustered Index Scan(OBJECT:([test].[dbo].[t1].[PK__t1__2D10D14A7FD17868]))\r\n       |--Clustered Index Scan(OBJECT:([test].[dbo].[t1].[PK__t1__2D10D14A7FD17868]))\r\n<\/code><\/pre>\n<p>Sin embargo, N1QL tiene aqu\u00ed una gran ventaja. Puesto que puede procesar MAX() con matrices, puede devolver todos los atributos del documento sin un an\u00e1lisis adicional.<\/p>\n<pre><code class=\"language-sql\">SELECT MAX([price, {productID, name]) FROM test;<\/code><\/pre>\n<p>O puede simplemente devolver el documento completo utilizando la siguiente consulta;<\/p>\n<pre><code class=\"language-sql\">SELECT MAX([price, test]) FROM test;<\/code><\/pre>\n<p>Veamos el plan de ejecuci\u00f3n de la consulta N1QL. Aqu\u00ed viene el spoiler: se ve una sola operaci\u00f3n FETCH que puede realizar el MAX y la proyecci\u00f3n se realiza sin un segundo FETCH.<\/p>\n<pre class=\"lang:default decode:true\">cbq&gt;explain select MAX([price,test])from test;\r\n{\r\n    \"requestID\":\"b735ce5f-700c-4740-a065-6d4ba681129f\",\r\n    \"signature\":\"json\",\r\n    \"results\":[\r\n        {\r\n            \"#operator\":\"Sequence\",\r\n            \"~children\":[\r\n                {\r\n                    \"#operator\":\"PrimaryScan\",\r\n                    \"index\":\"#primary\",\r\n                    \"keyspace\":\"test\",\r\n                    \"namespace\":\"default\",\r\n                    \"using\":\"gsi\"\r\n                },\r\n                {\r\n                    \"#operator\":\"Parallel\",\r\n                    \"~child\":{\r\n                        \"#operator\":\"Sequence\",\r\n                        \"~children\":[\r\n                            {\r\n                                \"#operator\":\"Fetch\",\r\n                                \"keyspace\":\"test\",\r\n                                \"namespace\":\"default\"\r\n                            },\r\n                            {\r\n                                \"#operator\":\"InitialGroup\",\r\n                                \"aggregates\":[\r\n                                    \"max([(`test`.`price`), `test`])\"\r\n                                ],\r\n                                \"group_keys\":[]\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                {\r\n                    \"#operator\":\"IntermediateGroup\",\r\n                    \"aggregates\":[\r\n                        \"max([(`test`.`price`), `test`])\"\r\n                    ],\r\n                    \"group_keys\":[]\r\n                },\r\n                {\r\n                    \"#operator\":\"FinalGroup\",\r\n                    \"aggregates\":[\r\n                        \"max([(`test`.`price`), `test`])\"\r\n                    ],\r\n                    \"group_keys\":[]\r\n                },\r\n                {\r\n                    \"#operator\":\"Parallel\",\r\n                    \"~child\":{\r\n                        \"#operator\":\"Sequence\",\r\n                        \"~children\":[\r\n                            {\r\n                                \"#operator\":\"InitialProject\",\r\n                                \"result_terms\":[\r\n                                    {\r\n                                        \"expr\":\"max([(`test`.`price`), `test`])\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            {\r\n                                \"#operator\":\"FinalProject\"\r\n                            }\r\n                        ]\r\n                    }\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"status\":\"success\",\r\n    \"metrics\":{\r\n        \"elapsedTime\":\"1.8224ms\",\r\n        \"executionTime\":\"1.7614ms\",\r\n        \"resultCount\":1,\r\n        \"resultSize\":2347\r\n    }\r\n}<\/pre>\n<p>Aunque, este es un truco muy bueno y una gran ganancia de rendimiento, s\u00f3lo hemos ara\u00f1ado la superficie de lo que N1QL es capaz de hacer. Hay mucho m\u00e1s por descubrir con N1QL. Puedes empezar a usar Couchbase Server y N1QL aqu\u00ed con la herramienta <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.1\/getting-started\/index.html\">gu\u00eda de iniciaci\u00f3n<\/a>.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Por cierto si quieres probar esto con SQL Server 2016 y Couchbase 4, aqu\u00ed tienes los scripts para verlo t\u00fa mismo en acci\u00f3n;<\/p>\n<p>Script SQL Server<\/p>\n<p>Nota: Ejecute esto en una base de datos llamada \"test\".<\/p>\n<pre class=\"lang:default decode:true\">create table t1(productID int primary key, price int, name varchar(128));\r\ngo\r\ninsert into t1(productID,price,name) values(1,10,'a');\r\ninsert into t1(productID,price,name) values(2,9,'b');\r\ninsert into t1(productID,price,name) values(3,12,'c');\r\ninsert into t1(productID,price,name) values(4,11,'d');\r\ninsert into t1(productID,price,name) values(5,1,'e');\r\ngo\r\nset statistics profile on\r\ngo\r\nselect max(price),productID,name from t1\r\ngo\r\n--Msg 8120, Level 16, State 1, Line 10\r\n--Column 't1.productID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.\r\nselect productID, name from t1 where price = (select max(price) from t1)\r\ngo<\/pre>\n<p>Este es el script del servidor Couchbase<\/p>\n<p>Nota: cree un cubo llamado \"test\".<\/p>\n<p>insert into prueba(clave,valor) values(\"1\",{productoID:1, precio:10, nombre:'a'});<\/p>\n<div>\n<pre class=\"lang:default decode:true\">insert into test(key,value) values(\"1\",{productID:1, price:10, name:'a'}); \r\ninsert into test(key,value) values(\"2\",{\"productID\":2, \"price\":9, \"name\":\"b\"});\r\ninsert into test(key,value) values(\"3\",{\"productID\":3, \"price\":12, \"name\":\"c\"});\r\ninsert into test(key,value) values(\"4\",{\"productID\":4, \"price\":11, \"name\":\"d\"});\r\ninsert into test(key,value) values(\"5\",{\"productID\":5, \"price\":1, \"name\":\"e\"});\r\ncreate primary index on test;\r\nselect max(price, productID, name) from t1;\r\nselect max([price, test]) from test;\r\nexplain select max([price, test]) from test;<\/pre>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>SQL has been around for a loooooong time. It is very intuitive and efficient way to process structured data and has been the choice for databases for many years. With the world of BIG DATA however, data has velocity, variety [&hellip;]<\/p>","protected":false},"author":7,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1812],"tags":[1556],"ppma_author":[8978],"class_list":["post-2101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-n1ql-query","tag-sql-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server - The Couchbase Blog<\/title>\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\/es\/n1ql-vs-tsql-processing-aggregations\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server\" \/>\n<meta property=\"og:description\" content=\"SQL has been around for a loooooong time. It is very intuitive and efficient way to process structured data and has been the choice for databases for many years. With the world of BIG DATA however, data has velocity, variety [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/n1ql-vs-tsql-processing-aggregations\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-05T18:03:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T02:30:33+00:00\" \/>\n<meta name=\"author\" content=\"Cihan Biyikoglu, Director of Product Management, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cihan Biyikoglu, Director of Product Management, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/\"},\"author\":{\"name\":\"Cihan Biyikoglu, Director of Product Management, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3d8c60500ca29254fcdb2f76f29fb088\"},\"headline\":\"N1QL vs TSQL &#8211; Aggregations with Couchbase Server vs SQL Server\",\"datePublished\":\"2016-01-05T18:03:32+00:00\",\"dateModified\":\"2025-06-14T02:30:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/\"},\"wordCount\":626,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"SQL Server\"],\"articleSection\":[\"Couchbase Server\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/\",\"name\":\"N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-01-05T18:03:32+00:00\",\"dateModified\":\"2025-06-14T02:30:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"N1QL vs TSQL &#8211; Aggregations with Couchbase Server vs SQL Server\"}]},{\"@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\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@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\/3d8c60500ca29254fcdb2f76f29fb088\",\"name\":\"Cihan Biyikoglu, Director of Product Management, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/a878e65cb37ac2419416d3289816abd5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3e1ac58dd480dd8a6e93d700a58d329bb81df928061de04395055a45274b8702?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3e1ac58dd480dd8a6e93d700a58d329bb81df928061de04395055a45274b8702?s=96&d=mm&r=g\",\"caption\":\"Cihan Biyikoglu, Director of Product Management, Couchbase\"},\"description\":\"Cihan Biyikoglu is a director of product management at Couchbase, responsible for the Couchbase Server product. Cihan is a big data enthusiast who brings over twenty years of experience to Redis Labs\u2019 product team. Cihan started his career as a C\/C++ developer.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/cihan-biyikoglu\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server - The Couchbase Blog","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\/es\/n1ql-vs-tsql-processing-aggregations\/","og_locale":"es_MX","og_type":"article","og_title":"N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server","og_description":"SQL has been around for a loooooong time. It is very intuitive and efficient way to process structured data and has been the choice for databases for many years. With the world of BIG DATA however, data has velocity, variety [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/es\/n1ql-vs-tsql-processing-aggregations\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-01-05T18:03:32+00:00","article_modified_time":"2025-06-14T02:30:33+00:00","author":"Cihan Biyikoglu, Director of Product Management, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Cihan Biyikoglu, Director of Product Management, Couchbase","Est. reading time":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/"},"author":{"name":"Cihan Biyikoglu, Director of Product Management, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3d8c60500ca29254fcdb2f76f29fb088"},"headline":"N1QL vs TSQL &#8211; Aggregations with Couchbase Server vs SQL Server","datePublished":"2016-01-05T18:03:32+00:00","dateModified":"2025-06-14T02:30:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/"},"wordCount":626,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["SQL Server"],"articleSection":["Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/","url":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/","name":"N1QL vs TSQL - Aggregations with Couchbase Server vs SQL Server - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-01-05T18:03:32+00:00","dateModified":"2025-06-14T02:30:33+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-vs-tsql-processing-aggregations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"N1QL vs TSQL &#8211; Aggregations with Couchbase Server vs SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","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":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@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\/3d8c60500ca29254fcdb2f76f29fb088","name":"Cihan Biyikoglu, Director de Gesti\u00f3n de Productos, Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/a878e65cb37ac2419416d3289816abd5","url":"https:\/\/secure.gravatar.com\/avatar\/3e1ac58dd480dd8a6e93d700a58d329bb81df928061de04395055a45274b8702?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1ac58dd480dd8a6e93d700a58d329bb81df928061de04395055a45274b8702?s=96&d=mm&r=g","caption":"Cihan Biyikoglu, Director of Product Management, Couchbase"},"description":"Cihan Biyikoglu es director de gesti\u00f3n de productos en Couchbase, responsable del producto Couchbase Server. Cihan es un entusiasta de los grandes datos que aporta m\u00e1s de veinte a\u00f1os de experiencia al equipo de productos de Redis Labs. Cihan comenz\u00f3 su carrera como desarrollador de C\/C++.","url":"https:\/\/www.couchbase.com\/blog\/es\/author\/cihan-biyikoglu\/"}]}},"authors":[{"term_id":8978,"user_id":7,"is_guest":0,"slug":"cihan-biyikoglu","display_name":"Cihan Biyikoglu, Director of Product Management, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3e1ac58dd480dd8a6e93d700a58d329bb81df928061de04395055a45274b8702?s=96&d=mm&r=g","author_category":"","last_name":"Biyikoglu","first_name":"Cihan","job_title":"","user_url":"","description":"Cihan Biyikoglu es director de gesti\u00f3n de productos en Couchbase, responsable del producto Couchbase Server. Cihan es un entusiasta de los grandes datos que aporta m\u00e1s de veinte a\u00f1os de experiencia al equipo de productos de Redis Labs. Cihan comenz\u00f3 su carrera como desarrollador de C\/C++."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=2101"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2101\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=2101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=2101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=2101"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=2101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}