{"id":1715,"date":"2014-12-16T18:58:50","date_gmt":"2014-12-16T18:58:49","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1715"},"modified":"2025-06-13T23:52:57","modified_gmt":"2025-06-14T06:52:57","slug":"n1ql-it-makes-cents","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/n1ql-it-makes-cents\/","title":{"rendered":"N1QL - \u00a1Hace c\u00e9ntimos!"},"content":{"rendered":"<p>*Ba Dum Tschhh*\u00a0 \u2026See what I did there? Makes cents? Get it? Haha.<\/p>\n<p>So\u2026 N1QL (pronounced Nickel)\u2026 Couchbase\u2019s new next-generation query language; what is it?\u00a0 Well, it\u2019s a rather genius designed, human readable \/ writable, extensible language designed for ad-hoc and operational querying within Couchbase.\u00a0 For those already familiar with querying within Couchbase, that blurb will probably make sense to you.\u00a0 If not \u2013 well, probably not, so let me clear it up a little more.<\/p>\n<p>But before I do that, I must inform you that this blog article isn\u2019t the best place for you to go if you want to dive in and get started learning N1QL.\u00a0 It is a view into N1QL from a developer\u2019s perspective including why I am so excited about it, and the features I am proud to point out.\u00a0 If you want to get started learning about N1QL, <a href=\"https:\/\/www.couchbase.com\/communities\/n1ql\/\">click here<\/a>.\u00a0 Or alternatively, go and have a go of the <a href=\"https:\/\/query.pub.couchbase.com\/tutorial\/#1\">Online Tutorial<\/a>.\u00a0 Anyway, back to clearing up what I mean when I say N1QL\u2026<\/p>\n<p>\u201cN1QL is similar to the standard SQL language for relational databases, but also includes additional features; which are suited for document-oriented databases.\u201d\u00a0\u00a0 N1QL has been designed as an intuitive Query Language for use on databases structured around Documents instead of tables.\u00a0 To locate and utilise information in a document-oriented database, you need the correct logic and expressions for navigating documents and document structures. N1QL provides a clear, easy-to-understand abstraction layer to query and retrieve information in your document-database.<\/p>\n<p>Before we move on with N1QL, let\u2019s talk quickly about document modeling within Couchbase.\u00a0 As you probably know; within Couchbase we model our documents primarily in JSON.\u00a0 We\u2019re all familiar with JSON, so I won\u2019t go into it in detail, but one thing we need to bear in mind is the fact that: our JSON documents can have complex nested data structures, nested arrays and objects which ordinarily would make querying a problem.\u00a0 Contrary to SQL though, N1QL has the ability to navigate nested data because it supports the concept of <strong><em>paths.<\/em><\/strong>\u00a0 This is <strong>very<\/strong> cool.\u00a0 We can use <em>paths<\/em> by using a dot-notation syntax to give us the logical location of an attribute within a document.\u00a0 For example; if we had an e-commerce site with documents containing customers\u2019 orders, we could look inside those documents, to an Nth nested level for attributes. So if we wanted to look for the customer\u2019s shipping street:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">orders.shipTo.street<\/div>\n<\/div>\n<p>Very cool, right?\u00a0 This is also one of the big differentiators that set this query language apart from SQL.<\/p>\n<p>Like most of you reading this, I too come from a SQL background.\u00a0 I believe I am safe to assume that 99% of you do too, right?\u00a0 If you do, you will notice that N1QL not only looks familiar, but feels familiar too, which gives us an instantaneous sense of worth due to the fact we almost know the syntax without learning anything new.<\/p>\n<p>Now let\u2019s run some queries and see what happens!\u00a0 For these queries, I shall be running them against the sample \u2018tutorial\u2019 data bucket as seen on the online tutorial \/ Developer Preview tutorial.\u00a0 First, let\u2019s have a look at how queries are formed:<\/p>\n<p>A basic query has three parts to it:<\/p>\n<ul>\n<li><strong><em>SELECT<\/em><\/strong> &#8211; Parts of document to return<\/li>\n<li><strong><em>FROM<\/em><\/strong> &#8211; The data bucket, or data store to work with<\/li>\n<li><strong><em>WHERE<\/em><\/strong> &#8211; Conditions the document must satisfy<\/li>\n<\/ul>\n<p>The query really only requires the SELECT clause.\u00a0 If we run the SELECT clause with a * wildcard; we will be selecting all parts of the document. So if we run the following query:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT *<br \/>\nFROM tutorial<br \/>\nWHERE fname = &#8216;Dave&#8217;<\/div>\n<\/div>\n<p>We will return the <a href=\"https:\/\/pastebin.com\/raw.php?i=WLikQhTR\">data as seen here\u2026<\/a><\/p>\n<p>Bearing in mind what we learned earlier about nested data structures, if we changed that * wildcard to use one of the nested attributes of the document \u2018<strong><em>children\u2019 <\/em><\/strong>instead of the * wildcard, we can return from our query just a fragment of the document.<\/p>\n<p>So by running:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT children<br \/>\nFROM tutorial<br \/>\nWHERE fname = &#8216;Dave&#8217;<\/div>\n<\/div>\n<p>We will return:<\/p>\n<div class=\"geshifilter\">\n<div class=\"javascript geshifilter-javascript\" style=\"font-family: monospace\"><span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;resultset&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #009900\">[<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;children&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #009900\">[<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;age&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #cc0000\">17<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;fname&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;Aiden&#8221;<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;gender&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;m&#8221;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;age&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #cc0000\">2<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;fname&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;Bill&#8221;<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;gender&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;m&#8221;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">]<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">]<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/div>\n<\/div>\n<p>Now remember, we have <strong>NO FIXED SCHEMA <\/strong>in Couchbase so we don\u2019t lose any of the amazing flexibility that we love about Couchbase.\u00a0 Now when I say we have no fixed schema, I mean that Couchbase doesn\u2019t enforce a schema; but our documents do of course have structure, given that they are JSON documents.<\/p>\n<p>N1QL querying works against documents, not rows or columns contrary to relational databases.\u00a0 As documents can have nested attributes and embedded arrays, a few additional <strong><em>operators\u00a0<\/em><\/strong>are needed. \u00a0In N1QL, we have a <strong>\u2018.\u2019 <\/strong>operator which is used to refer to children, and a <strong><em>\u2018[ ]\u2019<\/em><\/strong> operator which is used to refer to an element in an array.\u00a0 We can actually use a combination of the operators to access data at any depth in a document.<\/p>\n<p>For example; if we ran the query:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT children[0].fname AS cname<br \/>\nFROM tutorial<br \/>\nWHERE fname=&#8217;Dave&#8217;<\/div>\n<\/div>\n<p>Here we are fetching the first child\u2019s name and explicity aliasing it to \u2018cname\u2019.\u00a0 Attributes from child documents can be explicitly aliased using the <strong><em>AS <\/em><\/strong>clause.<\/p>\n<p>The result we return from that query is:<\/p>\n<div class=\"geshifilter\">\n<div class=\"javascript geshifilter-javascript\" style=\"font-family: monospace\"><span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;resultset&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #009900\">[<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;fname&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;Aiden&#8221;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">]<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/div>\n<\/div>\n<p>Document databases such as Couchbase often store meta-data about a document outside of the document.\u00a0 In N1QL, we use the <strong><em>\u2018META()\u2019 <\/em><\/strong>function to access the meta-data for each document in the sample tutorial database.\u00a0 From this query, the only fields we are going to return are the document metadata.\u00a0 The query is as follows:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT META() AS meta<br \/>\nFROM tutorial<\/div>\n<\/div>\n<p>And the results <a href=\"https:\/\/pastebin.com\/raw.php?i=UA69U2jx\">can be seen here\u2026<\/a><\/p>\n<p>In the previous queries, we used the <strong><em>\u2018WHERE\u2019 <\/em><\/strong>clause to match a single document, but we could also use other comparison operators to match multiple documents.\u00a0 Let\u2019s say for instance, we want to find everyone in our database whose age is over 30; we can run the following query:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT fname, age<br \/>\nFROM tutorial<br \/>\nWHERE age &gt; 30<\/div>\n<\/div>\n<p>Which will return <a href=\"https:\/\/pastebin.com\/raw.php?i=GDvPeNVG\">this result set\u2026<\/a><\/p>\n<p>All of the standard comparison operators are supported such as (&gt;, &gt;=, &lt;, &lt;=, = and !=).\u00a0 All of these comparisons also consider the value\u2019s type so <strong><em>score &gt; 8<\/em><\/strong>will return documents containing a numeric score that is greater than 8.<\/p>\n<p>One of the coolest features, in my opinion, is the way we can do pattern matching by using the <strong><em>\u2018LIKE\u2019 <\/em><\/strong>operator in the WHERE clause.\u00a0 Let\u2019s say, for instance, we need to find everyone in our database who has an email address with yahoo.com.\u00a0 We can run a query using the \u2018<strong><em>LIKE\u2019<\/em><\/strong> operator to match the email addresses.\u00a0 In this query, we will use the \u2018%\u2019 as a wildcard which will match 0 or more characters.\u00a0 We could also use the \u2018_\u2019 if we needed to match exactly 1 character.\u00a0 So, the query to find everyone in our database who uses a yahoo.com email address is:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT fname, email<br \/>\nFROM tutorial<br \/>\nWHERE email LIKE &#8216;%@yahoo.com&#8217;<\/div>\n<\/div>\n<p>As you can see, we have included the <strong><em>\u2018LIKE\u2019 <\/em><\/strong>operator in our WHERE clause to match the email addresses.\u00a0 The result set that query will return is like this\u2026<\/p>\n<div class=\"geshifilter\">\n<div class=\"javascript geshifilter-javascript\" style=\"font-family: monospace\"><span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;resultset&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #009900\">[<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;email&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;harry@yahoo.com&#8221;<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;fname&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;Harry&#8221;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">{<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;email&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;dave@yahoo.com&#8221;<\/span><span style=\"color: #339933\">,<\/span><br \/>\n<span style=\"color: #3366cc\">&#8220;fname&#8221;<\/span><span style=\"color: #339933\">:<\/span> <span style=\"color: #3366cc\">&#8220;Dave&#8221;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">]<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/div>\n<\/div>\n<p>Personally, I think this is one of the most handy features of N1QL!\u00a0 But let\u2019s say we want to do the opposite of what we\u2019ve just done, and we want to list all people who <strong>don\u2019t <\/strong>match the yahoo.com email address.\u00a0 Another wicked feature is the \u2018<strong><em>NOT LIKE\u2019<\/em><\/strong> operator which we can use to find documents that don\u2019t match the pattern.<\/p>\n<p>We can of course, combine multiple conditions by using the <strong>\u2018<em>AND\u2019<\/em> <\/strong>operator.\u00a0 For example, if we wanted to return people who have atleast one child, and a gmail email address, we would run:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT fname, email, children<br \/>\nFROM tutorial<br \/>\nWHERE LENGTH(children) &gt; 0 AND email LIKE &#8216;%@gmail.com&#8217;<\/div>\n<\/div>\n<p>We could also replace this \u2018<strong><em>AND\u2019 <\/em><\/strong>operator with the \u2018<strong><em>OR\u2019 <\/em><\/strong>operator to match on multiple conditions.<\/p>\n<p>The similarities to SQL querying continue as we move onto ordering and pagination of our query results.\u00a0 N1QL has included the familiar <strong><em>\u2018ORDER BY\u2019 <\/em><\/strong>clause to allow us to order our query result set.\u00a0 Queries can produce a lot of results if we have a very large data set, so we might want to paginate our results.\u00a0 Good news!\u00a0 We can do that too!\u00a0 A query including an <strong><em>\u2018ORDER BY\u2019<\/em><\/strong> clause and a <strong><em>\u2018LIMIT\u2019 <\/em><\/strong>paginator might look like the following:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT fname, age<br \/>\nFROM tutorial<br \/>\nORDER BY age<br \/>\nLIMIT 2<\/div>\n<\/div>\n<p>We can create data aggregates on our data set by utilising commands such as the <strong><em>\u2018COUNT()\u2019 <\/em><\/strong>function; which would tell us how many documents are in our bucket.\u00a0 We can also group our data by using the familiar \u2018<strong><em>GROUP BY\u2019 <\/em><\/strong>clause.\u00a0 If we wanted to filter the result set on which groups are returned, we can use the \u2018<strong><em>HAVING\u2019 <\/em><\/strong>clause, where we would have used the \u2018<strong><em>WHERE\u2019 <\/em><\/strong>clause to filter documents.<\/p>\n<p>If we wanted to return only groups who have more than one member, we can write a query like the following:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT relation, COUNT(*) AS count<br \/>\nFROM tutorial<br \/>\nGROUP BY relation<br \/>\nHAVING COUNT(*) &gt; 1<\/div>\n<\/div>\n<p>One last feature I\u2019d like to mention is the fact that we can do <strong><em>in-document joins (also called unnesting or flattening).<\/em><\/strong>\u00a0 This means we can take the contents of nested arrays and join them with the parent object.\u00a0 So, for instance; if we wanted to join Dave with each of his 2 children, we can write a query like the following:<\/p>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">SELECT *<br \/>\nFROM tutorial AS contact<br \/>\nOVER child IN contact.children<br \/>\nWHERE contact.fname = &#8216;Dave&#8217;<\/div>\n<\/div>\n<p>This query would return the result set as <a href=\"https:\/\/pastebin.com\/raw.php?i=pKAK1Fha\">you can see here\u2026<\/a><\/p>\n<p>Well, that pretty much wraps up the features of N1QL that I really wanted to show off.\u00a0 Personally, I think this is one of the most exciting Couchbase projects, I absolutely love the syntax of N1QL and think the project itself is fantastic.<\/p>\n<p>If you want to get started using N1QL, you can download the Developer Preview now, by visiting the <a href=\"https:\/\/www.couchbase.com\/communities\/n1ql\/\">N1QL section of our Community Portal.<\/a><\/p>\n<p>If you want to walk through the 15-minute online tutorial for a deeper dive, you can <a href=\"https:\/\/query.pub.couchbase.com\/tutorial\/#1\">do so here.<\/a><\/p>\n<p>And if you want a more in-depth Developer Preview guide to N1QL, you can see the official docs by <a href=\"https:\/\/docs.couchbase.com\/couchbase-query-language-0.1\/\">clicking here.<\/a><\/p>\n<p>I hope this blog has inspired you to get started using N1QL, as it is incredibly fun to use and a very cool piece of technology. \u00a0If you have any questions on your adventures into the N1QL world, I encourage you to ask away in our <a href=\"https:\/\/www.couchbase.com\/communities\/n1ql\/\">N1QL Community Portal<\/a> and get them answered by the pros!<\/p>\n<p>Go ahead and dive into the N1QL world!\u00a0 I&#8217;ll see you in there!<\/p>\n<p><strong>&#8211; Robin Johnson<\/strong><br \/>\nDeveloper Advocate, Europe<\/p>\n","protected":false},"excerpt":{"rendered":"<p>*Ba Dum Tschhh*\u00a0 \u2026See what I did there? Makes cents? Get it? Haha. So\u2026 N1QL (pronounced Nickel)\u2026 Couchbase\u2019s new next-generation query language; what is it?\u00a0 Well, it\u2019s a rather genius designed, human readable \/ writable, extensible language designed for ad-hoc [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1812],"tags":[],"ppma_author":[8968],"class_list":["post-1715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n1ql-query"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>N1QL - It Makes Cents! - 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-it-makes-cents\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"N1QL - It Makes Cents!\" \/>\n<meta property=\"og:description\" content=\"*Ba Dum Tschhh*\u00a0 \u2026See what I did there? Makes cents? Get it? Haha. So\u2026 N1QL (pronounced Nickel)\u2026 Couchbase\u2019s new next-generation query language; what is it?\u00a0 Well, it\u2019s a rather genius designed, human readable \/ writable, extensible language designed for ad-hoc [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/n1ql-it-makes-cents\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-16T18:58:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:52:57+00:00\" \/>\n<meta name=\"author\" content=\"The Couchbase Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"The Couchbase Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 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-it-makes-cents\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/\"},\"author\":{\"name\":\"The Couchbase Team\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/764f4a6771ee19bc7af70b70a326fb93\"},\"headline\":\"N1QL &#8211; It Makes Cents!\",\"datePublished\":\"2014-12-16T18:58:49+00:00\",\"dateModified\":\"2025-06-14T06:52:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/\"},\"wordCount\":1819,\"commentCount\":21,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"SQL++ \\\/ N1QL Query\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/\",\"name\":\"N1QL - It Makes Cents! - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2014-12-16T18:58:49+00:00\",\"dateModified\":\"2025-06-14T06:52:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/n1ql-it-makes-cents\\\/#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-it-makes-cents\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"N1QL &#8211; It Makes Cents!\"}]},{\"@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\\\/764f4a6771ee19bc7af70b70a326fb93\",\"name\":\"The Couchbase Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g7befc37d02226b59499817eafdec60c3\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g\",\"caption\":\"The Couchbase Team\"},\"description\":\"Jennifer Garcia is a Senior Web Manager at Couchbase Inc. As the website manager, Jennifer has overall responsibility for the website properties including design, implementation, content, and performance.\",\"sameAs\":[\"https:\\\/\\\/www.couchbase.com\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/es\\\/author\\\/jennifer-garcia\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"N1QL - It Makes Cents! - 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-it-makes-cents\/","og_locale":"es_MX","og_type":"article","og_title":"N1QL - It Makes Cents!","og_description":"*Ba Dum Tschhh*\u00a0 \u2026See what I did there? Makes cents? Get it? Haha. So\u2026 N1QL (pronounced Nickel)\u2026 Couchbase\u2019s new next-generation query language; what is it?\u00a0 Well, it\u2019s a rather genius designed, human readable \/ writable, extensible language designed for ad-hoc [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/es\/n1ql-it-makes-cents\/","og_site_name":"The Couchbase Blog","article_published_time":"2014-12-16T18:58:49+00:00","article_modified_time":"2025-06-14T06:52:57+00:00","author":"The Couchbase Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"The Couchbase Team","Est. reading time":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/"},"author":{"name":"The Couchbase Team","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/764f4a6771ee19bc7af70b70a326fb93"},"headline":"N1QL &#8211; It Makes Cents!","datePublished":"2014-12-16T18:58:49+00:00","dateModified":"2025-06-14T06:52:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/"},"wordCount":1819,"commentCount":21,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["SQL++ \/ N1QL Query"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/","url":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/","name":"N1QL - It Makes Cents! - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2014-12-16T18:58:49+00:00","dateModified":"2025-06-14T06:52:57+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/n1ql-it-makes-cents\/#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-it-makes-cents\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"N1QL &#8211; It Makes Cents!"}]},{"@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\/764f4a6771ee19bc7af70b70a326fb93","name":"El equipo de Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g7befc37d02226b59499817eafdec60c3","url":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","caption":"The Couchbase Team"},"description":"Jennifer Garcia es Gerente Senior de Web en Couchbase Inc. Como responsable del sitio web, Jennifer tiene la responsabilidad general de las propiedades del sitio web, incluido el dise\u00f1o, la implementaci\u00f3n, el contenido y el rendimiento.","sameAs":["https:\/\/www.couchbase.com"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/jennifer-garcia\/"}]}},"acf":[],"authors":[{"term_id":8968,"user_id":2,"is_guest":0,"slug":"jennifer-garcia","display_name":"The Couchbase Team","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1715","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=1715"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1715\/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=1715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=1715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=1715"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=1715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}