{"id":246,"date":"2015-12-02T21:01:03","date_gmt":"2015-12-02T14:01:03","guid":{"rendered":"http:\/\/www.sqlitetutorial.net\/?page_id=246"},"modified":"2022-04-03T15:01:39","modified_gmt":"2022-04-03T08:01:39","slug":"sqlite-self-join","status":"publish","type":"page","link":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/","title":{"rendered":"SQLite Self-Join"},"content":{"rendered":"\r\n<p><strong>Summary<\/strong>: in this tutorial, you will learn about a special type of join called SQLite self-join that allows you to join table to itself.<\/p>\r\n\r\n\r\n\r\n<p class=\"note\">Note that you should be familiar with&nbsp; <code><a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-inner-join\/\">INNER JOIN<\/a><\/code> and <code><a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-left-join\/\">LEFT JOIN<\/a><\/code> clauses before going forward with this tutorial.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Introduction to SQLite self-join<\/h2>\r\n\r\n\r\n\r\n<p>The self-join is a special kind of joins that allow you to join a table to itself using either <code>LEFT JOIN<\/code> or <code>INNER JOIN<\/code> clause. You use self-join to create a result set that joins the rows with the other rows within the same table.<\/p>\r\n\r\n\r\n\r\n<p>Because you cannot refer to the same table more than one in a query, you need to use a table alias to assign the table a different name when you use self-join.<\/p>\r\n\r\n\r\n\r\n<p>The self-join compares values of the same or different columns in the same table. Only one table is involved in the self-join.<\/p>\r\n\r\n\r\n\r\n<p>You often use self-join to query parents\/child relationship stored in a table or to obtain running totals.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">SQLite self-join examples<\/h2>\r\n\r\n\r\n\r\n<p>We will use the <code>employees<\/code> table in the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-sample-database\/\">sample database<\/a> for demonstration.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"193\" height=\"344\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\" alt=\"\" class=\"wp-image-1562\" srcset=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png 193w, https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees-168x300.png 168w\" sizes=\"auto, (max-width: 193px) 100vw, 193px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>The <code>employees<\/code> table stores not only employee data but also organizational data. The <code>ReportsTo<\/code> column specifies the reporting relationship between employees.<\/p>\r\n\r\n\r\n\r\n<p>If an employee reports to a manager, the value of the <code>ReportsTo<\/code> column of the employee&#8217;s row is equal to the value of the <code>EmployeeId<\/code> column of the manager&#8217;s row. In case an employee does not report to anyone, the <code>ReportsTo<\/code> column is <code>NULL<\/code>.<\/p>\r\n\r\n\r\n\r\n<p>To get the information on who is the direct report of whom, you use the following statement:<\/p>\r\n\r\n\r\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> m.firstname || <span class=\"hljs-string\">' '<\/span> || m.lastname <span class=\"hljs-keyword\">AS<\/span> <span class=\"hljs-string\">'Manager'<\/span>,\r\n       e.firstname || <span class=\"hljs-string\">' '<\/span> || e.lastname <span class=\"hljs-keyword\">AS<\/span> <span class=\"hljs-string\">'Direct report'<\/span> \r\n<span class=\"hljs-keyword\">FROM<\/span> employees e\r\n<span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span> employees m <span class=\"hljs-keyword\">ON<\/span> m.employeeid = e.reportsto\r\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> manager;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-self-join\/#1\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"243\" height=\"160\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/12\/SQLite-self-join-example.jpg\" alt=\"SQLite self join example\" class=\"wp-image-262\"\/><\/figure>\r\n\r\n\r\n\r\n<p>The statement used the <code>INNER JOIN<\/code> clause to join the <code>employees<\/code> to itself. The <code>employees<\/code> table has two roles: employees and managers.<\/p>\r\n\r\n\r\n\r\n<p>Because we used the <code>INNER JOIN<\/code> clause to join the <code>employees<\/code> table to itself, the result set does not have the row whose manager column contains a <code>NULL<\/code> value.<\/p>\r\n\r\n\r\n\r\n<p>Note that the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-string-functions\/sqlite-concat\/\">concatenation operator<\/a> <code>||<\/code> concatenates multiple strings into a single string. In the example, we use the concatenation operator to from the full names of the employees by concatenating the first name, space, and last name.<\/p>\r\n\r\n\r\n\r\n<p>In case you want to query the CEO who does not report to anyone, you need to change the <code>INNER JOIN<\/code> clause to <code>LEFT JOIN<\/code> clause in the query above.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"243\" height=\"181\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/12\/SQLite-self-join-with-left-join-example.jpg\" alt=\"SQLite self join with left join example\" class=\"wp-image-263\"\/><\/figure>\r\n\r\n\r\n\r\n<p><code>Andrew Adams<\/code> is the CEO because he does not report anyone.<\/p>\r\n\r\n\r\n\r\n<p>You can use the self-join technique to find the employees located in the same city as the following query:<\/p>\r\n\r\n\r\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> <span class=\"hljs-keyword\">DISTINCT<\/span>\r\n\te1.city,\r\n\te1.firstName || <span class=\"hljs-string\">' '<\/span> || e1.lastname <span class=\"hljs-keyword\">AS<\/span> fullname\r\n<span class=\"hljs-keyword\">FROM<\/span>\r\n\temployees e1\r\n<span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span> employees e2 <span class=\"hljs-keyword\">ON<\/span> e2.city = e1.city \r\n   <span class=\"hljs-keyword\">AND<\/span> (e1.firstname &lt;&gt; e2.firstname <span class=\"hljs-keyword\">AND<\/span> e1.lastname &lt;&gt; e2.lastname)\r\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\r\n\te1.city;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-self-join\/#2\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/12\/SQLite-self-join-employees-locate-in-the-same-city.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"162\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/12\/SQLite-self-join-employees-locate-in-the-same-city.jpg\" alt=\"SQLite self join - employees locate in the same city\" class=\"wp-image-264\"\/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>The join condition has two expressions:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\"><li><code>e1.city = e2.city<\/code> to make sure that both employees located in the same city<\/li><li><code>e.firstname &lt;&gt; e2.firstname AND e1.lastname &lt;&gt; e2.lastname<\/code> to ensure that <code>e1<\/code> and <code>e2<\/code> are not the same employee with the assumption that there aren&#8217;t employees who have the same first name and last name.<\/li><\/ul>\r\n\r\n\r\n\r\n<p>In this tutorial, we have shown you how to use the SQLite self-join technique to join a table to itself.<\/p>\r\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"246\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\"\n\t\t\t\tdata-post-title=\"SQLite Self-Join\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"246\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\"\n\t\t\t\tdata-post-title=\"SQLite Self-Join\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, you will learn about a special type of join called SQLite self-join that allows you to join table to itself. Note that you should be familiar with&nbsp; INNER JOIN and LEFT JOIN clauses before going forward with this tutorial. Introduction to SQLite self-join The self-join is a special kind of joins [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":18,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-246","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SQLite Self-join - Joining a Table to Itself<\/title>\n<meta name=\"description\" content=\"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.\" \/>\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.sqlitetutorial.net\/sqlite-self-join\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQLite Self-join - Joining a Table to Itself\" \/>\n<meta property=\"og:description\" content=\"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\" \/>\n<meta property=\"og:site_name\" content=\"SQLite Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-03T08:01:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427\"},\"headline\":\"SQLite Self-Join\",\"datePublished\":\"2015-12-02T14:01:03+00:00\",\"dateModified\":\"2022-04-03T08:01:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\"},\"wordCount\":452,\"image\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\",\"url\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\",\"name\":\"SQLite Self-join - Joining a Table to Itself\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\",\"datePublished\":\"2015-12-02T14:01:03+00:00\",\"dateModified\":\"2022-04-03T08:01:39+00:00\",\"description\":\"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage\",\"url\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\",\"contentUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png\",\"width\":193,\"height\":344,\"caption\":\"SQLite concat_ws() Function\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlitetutorial.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQLite Self-Join\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#website\",\"url\":\"https:\/\/www.sqlitetutorial.net\/\",\"name\":\"SQLite Tutorial\",\"description\":\"A Step-by-step SQLite Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlitetutorial.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427\",\"name\":\"admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQLite Self-join - Joining a Table to Itself","description":"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.","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.sqlitetutorial.net\/sqlite-self-join\/","og_locale":"en_US","og_type":"article","og_title":"SQLite Self-join - Joining a Table to Itself","og_description":"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.","og_url":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/","og_site_name":"SQLite Tutorial","article_modified_time":"2022-04-03T08:01:39+00:00","og_image":[{"url":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#article","isPartOf":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/"},"author":{"name":"admin","@id":"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427"},"headline":"SQLite Self-Join","datePublished":"2015-12-02T14:01:03+00:00","dateModified":"2022-04-03T08:01:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/"},"wordCount":452,"image":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/","url":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/","name":"SQLite Self-join - Joining a Table to Itself","isPartOf":{"@id":"https:\/\/www.sqlitetutorial.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png","datePublished":"2015-12-02T14:01:03+00:00","dateModified":"2022-04-03T08:01:39+00:00","description":"This tutorial shows you how to use SQLite self-join technique to create a result set that join rows with other rows in the same table.","breadcrumb":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#primaryimage","url":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png","contentUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/employees.png","width":193,"height":344,"caption":"SQLite concat_ws() Function"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-self-join\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlitetutorial.net\/"},{"@type":"ListItem","position":2,"name":"SQLite Self-Join"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlitetutorial.net\/#website","url":"https:\/\/www.sqlitetutorial.net\/","name":"SQLite Tutorial","description":"A Step-by-step SQLite Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlitetutorial.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427","name":"admin"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/comments?post=246"}],"version-history":[{"count":1,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/246\/revisions"}],"predecessor-version":[{"id":2779,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/246\/revisions\/2779"}],"up":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/media?parent=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}