CINXE.COM
Need help with N1QL - SQL++ - Couchbase Forums
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Need help with N1QL - SQL++ - Couchbase Forums</title> <meta name="description" content="I have the below SQL ++ query select t1.admins_devs from ( select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = &quot;partnerApp&quot; and data.companyId = &quot;5b04051&hellip;"> <meta name="generator" content="Discourse 3.5.0.beta2-dev - https://github.com/discourse/discourse version 424da95128bd2e92c4d8e42baf65a947602e9c68"> <link rel="icon" type="image/png" href="https://global.discourse-cdn.com/couchbase/optimized/2X/5/5c3358874946bfe880e9bf3ffda96c2bc67451a6_2_32x32.png"> <link rel="apple-touch-icon" type="image/png" href="https://global.discourse-cdn.com/couchbase/optimized/2X/b/b979c51a7b008edb40f4aaf42a8b8946bc100805_2_180x180.png"> <meta name="theme-color" media="all" content="#ffffff"> <meta name="color-scheme" content="light"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, viewport-fit=cover"> <meta name="discourse-base-uri" content="/forums"> <link rel="canonical" href="https://www.couchbase.com/forums/t/need-help-with-n1ql/39392" /> <link rel="search" type="application/opensearchdescription+xml" href="https://www.couchbase.com/forums/opensearch.xml" title="Couchbase Forums Search"> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/color_definitions_couchbase-peach_9_5_ab174a10fb96d72c85c018c3c55c5fadf1a41613.css?__ws=www.couchbase.com" media="all" rel="stylesheet" class="light-scheme"/> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/checklist_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="checklist" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-ai_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-ai" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-akismet_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-akismet" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-algolia_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-algolia" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-cakeday_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-cakeday" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-data-explorer_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-data-explorer" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-details_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-details" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-lazy-videos_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-lazy-videos" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-local-dates_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-local-dates" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-narrative-bot_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-narrative-bot" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-policy_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-policy" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-presence_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-presence" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-solved_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-solved" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-templates_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-templates" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-topic-voting_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-topic-voting" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/footnote_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="footnote" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/hosted-site_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="hosted-site" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/poll_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="poll" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/spoiler-alert_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="spoiler-alert" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-ai_desktop_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-ai_desktop" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/discourse-topic-voting_desktop_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="discourse-topic-voting_desktop" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/poll_desktop_3af6c98092cd70834b4e7a2ee96d327d620393a4.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="poll_desktop" /> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_theme_12_72dc6d44ead417d71e88813c4d885dc97f76f44f.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="12" data-theme-name="discourse clickable topic"/> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_theme_10_5b0b1529a6a32a5aadaada5dc3d80408d1186da3.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="10" data-theme-name="modern category + group boxes"/> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_theme_5_8e99c231efb3cbea9beda8c0bb88e94287f68559.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="5" data-theme-name="mint"/> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_theme_16_f42306ced0fb3b466b05b3253dba728a5248581a.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="16" data-theme-name="couchbase 2"/> <link href="https://sea2.discourse-cdn.com/couchbase/forums/stylesheets/desktop_theme_4_6069e6e9863625ef3110ca06478152827ac5bbea.css?__ws=www.couchbase.com" media="all" rel="stylesheet" data-target="desktop_theme" data-theme-id="4" data-theme-name="header alignment fix"/> <!-- OneTrust Cookies Consent Notice start for couchbase.com --> <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="748511ff-10bf-44bf-88b8-36382e5b5fd9" nonce="ZKlizvc7XcWHs2SWScEI7iFlb"></script> <!-- OneTrust Cookies Consent Notice end for couchbase.com --><script defer="" src="https://sea2.discourse-cdn.com/couchbase/forums/theme-javascripts/87b4efff34091d9be9e0da05837c945fe6220398.js?__ws=www.couchbase.com" data-theme-id="17" nonce="ZKlizvc7XcWHs2SWScEI7iFlb"></script> <link rel="alternate nofollow" type="application/rss+xml" title="RSS feed of 'Need help with N1QL'" href="https://www.couchbase.com/forums/t/need-help-with-n1ql/39392.rss" /> <meta property="og:site_name" content="Couchbase Forums" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:image" content="https://global.discourse-cdn.com/couchbase/original/2X/0/01f9ae109c030e7bf64d0812eaa8a3b08cf5ce60.png" /> <meta property="og:image" content="https://global.discourse-cdn.com/couchbase/original/2X/3/3d0d79fb182d067253be4666da0e1ec321b9536b.svg" /> <meta property="og:url" content="https://www.couchbase.com/forums/t/need-help-with-n1ql/39392" /> <meta name="twitter:url" content="https://www.couchbase.com/forums/t/need-help-with-n1ql/39392" /> <meta property="og:title" content="Need help with N1QL" /> <meta name="twitter:title" content="Need help with N1QL" /> <meta property="og:description" content="I have the below SQL ++ query select t1.admins_devs from ( select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalAdmins is not null union select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalDevelopers),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4..." /> <meta name="twitter:description" content="I have the below SQL ++ query select t1.admins_devs from ( select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalAdmins is not null union select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalDevelopers),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4..." /> <meta property="og:article:section" content="SQL++" /> <meta property="og:article:section:color" content="C71A25" /> <meta property="og:article:tag" content="n1ql" /> <meta property="article:published_time" content="2024-10-28T05:35:59+00:00" /> <meta property="og:ignore_canonical" content="true" /> <script type="application/ld+json">{"@context":"http://schema.org","@type":"QAPage","name":"Need help with N1QL","mainEntity":{"@type":"Question","name":"Need help with N1QL","text":"I have the below SQL ++ query\n\nselect t1.admins_devs\n\nfrom\n\n(\n\nselect ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = "partnerApp"\n\nand data.companyId = "5b0405112baf4695b2ed994d43402b70"\n\nand deleted = false and backupOf is null and data.ad…","upvoteCount":0,"answerCount":0,"datePublished":"2024-10-28T05:35:59.142Z","author":{"@type":"Person","name":"Hemanth_Shekar","url":"https://www.couchbase.com/forums/u/Hemanth_Shekar"}}}</script> </head> <body class="crawler browser-update"> <header> <a href="/forums/"> Couchbase Forums </a> </header> <div id="main-outlet" class="wrap" role="main"> <div id="topic-title"> <h1> <a href="/forums/t/need-help-with-n1ql/39392">Need help with N1QL</a> </h1> <div class="topic-category" itemscope itemtype="http://schema.org/BreadcrumbList"> <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a href="/forums/c/sql/16" class="badge-wrapper bullet" itemprop="item"> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name' itemprop='name'>SQL++</span> </span> </a> <meta itemprop="position" content="1" /> </span> </div> <div class="topic-category"> <div class='discourse-tags list-tags'> <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag' rel="tag">n1ql</a> </div> </div> </div> <div itemscope itemtype='http://schema.org/DiscussionForumPosting'> <meta itemprop='headline' content='Need help with N1QL'> <link itemprop='url' href='https://www.couchbase.com/forums/t/need-help-with-n1ql/39392'> <meta itemprop='datePublished' content='2024-10-28T05:35:59Z'> <meta itemprop='articleSection' content='SQL++'> <meta itemprop='keywords' content='n1ql'> <div itemprop='publisher' itemscope itemtype="http://schema.org/Organization"> <meta itemprop='name' content='Couchbase Forums'> <div itemprop='logo' itemscope itemtype="http://schema.org/ImageObject"> <meta itemprop='url' content='https://global.discourse-cdn.com/couchbase/original/2X/0/01f9ae109c030e7bf64d0812eaa8a3b08cf5ce60.png'> </div> </div> <div id='post_1' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" rel='nofollow' href='https://www.couchbase.com/forums/u/Hemanth_Shekar'><span itemprop='name'>Hemanth_Shekar</span></a> </span> <link itemprop="mainEntityOfPage" href="https://www.couchbase.com/forums/t/need-help-with-n1ql/39392"> <span class="crawler-post-infos"> <time datetime='2024-10-28T05:35:59Z' class='post-time'> October 28, 2024, 5:35am </time> <meta itemprop='dateModified' content='2024-10-28T05:35:59Z'> <span itemprop='position'>1</span> </span> </div> <div class='post' itemprop='text'> <p>I have the below SQL ++ query</p> <pre><code class="lang-auto">select t1.admins_devs from ( select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalAdmins is not null union select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalDevelopers),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalDevelopers is not null )t1 </code></pre> <p>It gives result as below.</p> <pre><code class="lang-auto">[ { "admins_devs": [ "3242eb1964334ce2861ee10e27473705", "a99a6cfd45c4438d95080a09856b8075" ] }, { "admins_devs": [ "6c5281d6f6d846d2bd09853ff5daea0d", "3242eb1964334ce2861ee10e27473705" ] } ] </code></pre> <p>I want a single array with all the values.</p> <pre><code class="lang-auto">[ "3242eb1964334ce2861ee10e27473705", "a99a6cfd45c4438d95080a09856b8075", "6c5281d6f6d846d2bd09853ff5daea0d" ] </code></pre> <p>Please note that any of the 2 sql ++ being union can return null . We want to be able to handle that. There maight be results that are common between upper and lower SQL ++ being union , result must have only 1 instance of all occurrences</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_2' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" rel='nofollow' href='https://www.couchbase.com/forums/u/dh'><span itemprop='name'>dh</span></a> </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2024-10-28T06:40:42Z' class='post-time'> October 28, 2024, 6:40am </time> <meta itemprop='dateModified' content='2024-10-28T06:40:42Z'> <span itemprop='position'>2</span> </span> </div> <div class='post' itemprop='text'> <p>You haven鈥檛 stated what you鈥檝e attempted?</p> <p>You want a single string (or possibly null) value for each result not a single result that is an unnamed array of strings (and possibly a null) ?</p> <p>For a single result that is an array of strings, try changing:</p> <aside class="quote no-group" data-username="Hemanth_Shekar" data-post="1" data-topic="39392"> <div class="title"> <div class="quote-controls"></div> <img loading="lazy" alt="" width="24" height="24" src="https://sea2.discourse-cdn.com/couchbase/forums/user_avatar/www.couchbase.com/hemanth_shekar/48/6131_2.png" class="avatar"> Hemanth_Shekar:</div> <blockquote> <p><code>select t1.admins_devs</code></p> </blockquote> </aside> <p>To:</p> <pre><code class="lang-auto">select raw array_distinct(array_flatten(array_agg(t1.admins_devs),1)) </code></pre> <p>instead. You don鈥檛 state what you want to happen with NULL results - if you don鈥檛 want them, then add <code>WHERE t1.admins_dev IS NOT NULL</code> to the outer select. If you want a null value in the final array, you don鈥檛 need to do anything (a single null will be in the final array).</p> <p>If you want single-level values as the results, one way is to UNNEST (LEFT if you want to include a null) your results and simply SELECT DISTINCT:</p> <pre><code class="lang-auto">select distinct raw ad from ( select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalAdmins),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalAdmins is not null union select ARRAY_FLATTEN(ARRAY_AGG( DISTINCT data.additionalDevelopers),1) as admins_devs from api_external where type = "partnerApp" and data.companyId = "5b0405112baf4695b2ed994d43402b70" and deleted = false and backupOf is null and data.additionalDevelopers is not null ) t1 left unnest admins_devs ad </code></pre> <p>HTH.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> <div id='post_3' itemprop='comment' itemscope itemtype='http://schema.org/Comment' class='topic-body crawler-post'> <div class='crawler-post-meta'> <span class="creator" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" rel='nofollow' href='https://www.couchbase.com/forums/u/system'><span itemprop='name'>system</span></a> Closed </span> <span class="crawler-post-infos"> <time itemprop='datePublished' datetime='2025-01-26T06:41:02Z' class='post-time'> January 26, 2025, 6:41am </time> <meta itemprop='dateModified' content='2025-01-26T06:41:02Z'> <span itemprop='position'>3</span> </span> </div> <div class='post' itemprop='text'> <p>This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.</p> </div> <div itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> <meta itemprop="interactionType" content="http://schema.org/LikeAction"/> <meta itemprop="userInteractionCount" content="0" /> <span class='post-likes'></span> </div> </div> </div> <div id="related-topics" class="more-topics__list " role="complementary" aria-labelledby="related-topics-title"> <h3 id="related-topics-title" class="more-topics__list-title"> Related topics </h3> <div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'> <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'> <table class='topic-list'> <thead> <tr> <th>Topic</th> <th></th> <th class="replies">Replies</th> <th class="views">Views</th> <th>Activity</th> </tr> </thead> <tbody> <tr class="topic-list-item" id="topic-list-item-38720"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='1'> <span class="link-top-line"> <a itemprop='url' href='https://www.couchbase.com/forums/t/please-help-me-with-the-sql/38720' class='title raw-link raw-topic-link'>Please help me with the SQL++</a> </span> <div class="link-bottom-line"> <a href='/forums/c/sql/16' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name'>SQL++</span> </span> </a> <div class="discourse-tags"> <a href='https://www.couchbase.com/forums/tag/query' class='discourse-tag'>query</a> , <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag'>n1ql</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>3</span> </td> <td class="views"> <span class='views' title='views'>112</span> </td> <td> October 1, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-39982"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='2'> <span class="link-top-line"> <a itemprop='url' href='https://www.couchbase.com/forums/t/how-to-write-the-below-n1ql/39982' class='title raw-link raw-topic-link'>How to write the below N1QL</a> </span> <div class="link-bottom-line"> <a href='/forums/c/sql/16' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name'>SQL++</span> </span> </a> <div class="discourse-tags"> <a href='https://www.couchbase.com/forums/tag/query' class='discourse-tag'>query</a> , <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag'>n1ql</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>27</span> </td> <td> January 7, 2025 </td> </tr> <tr class="topic-list-item" id="topic-list-item-20926"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='3'> <span class="link-top-line"> <a itemprop='url' href='https://www.couchbase.com/forums/t/union-all-without-null-data-in-already-exist-data/20926' class='title raw-link raw-topic-link'>Union all without null data in already exist data</a> </span> <div class="link-bottom-line"> <a href='/forums/c/sql/16' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name'>SQL++</span> </span> </a> <div class="discourse-tags"> <a href='https://www.couchbase.com/forums/tag/query' class='discourse-tag'>query</a> , <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag'>n1ql</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>645</span> </td> <td> April 11, 2019 </td> </tr> <tr class="topic-list-item" id="topic-list-item-38613"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='4'> <span class="link-top-line"> <a itemprop='url' href='https://www.couchbase.com/forums/t/need-help-writing-a-n1ql-query/38613' class='title raw-link raw-topic-link'>Need help writing a N1QL query</a> </span> <div class="link-bottom-line"> <a href='/forums/c/sql/16' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name'>SQL++</span> </span> </a> <div class="discourse-tags"> <a href='https://www.couchbase.com/forums/tag/query' class='discourse-tag'>query</a> , <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag'>n1ql</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>2</span> </td> <td class="views"> <span class='views' title='views'>138</span> </td> <td> September 10, 2024 </td> </tr> <tr class="topic-list-item" id="topic-list-item-16793"> <td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <meta itemprop='position' content='5'> <span class="link-top-line"> <a itemprop='url' href='https://www.couchbase.com/forums/t/convert-result-of-a-n1ql-to-array/16793' class='title raw-link raw-topic-link'>Convert result of a N1QL to array</a> </span> <div class="link-bottom-line"> <a href='/forums/c/sql/16' class='badge-wrapper bullet'> <span class='badge-category-bg' style='background-color: #C71A25'></span> <span class='badge-category clear-badge'> <span class='category-name'>SQL++</span> </span> </a> <div class="discourse-tags"> <a href='https://www.couchbase.com/forums/tag/query' class='discourse-tag'>query</a> , <a href='https://www.couchbase.com/forums/tag/n1ql' class='discourse-tag'>n1ql</a> </div> </div> </td> <td class="replies"> <span class='posts' title='posts'>1</span> </td> <td class="views"> <span class='views' title='views'>2063</span> </td> <td> May 10, 2018 </td> </tr> </tbody> </table> </div> </div> </div> <footer class="container wrap"> <nav class='crawler-nav'> <ul> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/forums/' itemprop="url">Home </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/forums/categories' itemprop="url">Categories </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='/forums/guidelines' itemprop="url">Guidelines </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='https://www.couchbase.com/terms-of-use/' itemprop="url">Terms of Service </a> </span> </li> <li itemscope itemtype='http://schema.org/SiteNavigationElement'> <span itemprop='name'> <a href='https://www.couchbase.com/privacy-policy/' itemprop="url">Privacy Policy </a> </span> </li> </ul> </nav> <p class='powered-by-link'>Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled</p> </footer> <!-- EXPORTED TAGS --> <!-- Tags for Couchbase oneTag --> <!-- One Tag Conditional Container: Couchbase (6792) | Couchbase oneTag (5045) --> <script defer="" src="https://sea2.discourse-cdn.com/couchbase/forums/theme-javascripts/34713efacfccdc324338cc33fc0190f9dbf12b74.js?__ws=www.couchbase.com" data-theme-id="16" nonce="ZKlizvc7XcWHs2SWScEI7iFlb"></script> <div class="buorg"><div>Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.</div></div> </body> </html>