{"id":12380,"date":"2021-01-13T10:55:07","date_gmt":"2021-01-13T18:55:07","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12380"},"modified":"2023-12-01T04:08:04","modified_gmt":"2023-12-01T12:08:04","slug":"sql-subquery","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/sql-subquery\/","title":{"rendered":"SQL Subquery: A Complete Guide"},"content":{"rendered":"\n<p><em>An SQL subquery is a query inside another query. It is used in the WHERE or HAVING clause of an SQL statement. Subqueries let you specify the results of one query as an argument in another query.<\/em><\/p>\n\n\n\n<p>When you\u2019re writing an <em>SQL<\/em> query, you may want to specify a parameter based on the result of another query. For example, say you have a list of customers. You may want to get a list of customers who have placed orders worth a value over a certain amount. Order and customer information is stored within a different table.<\/p>\n\n\n\n<p>That\u2019s where the <em>SQL subquery<\/em> operation comes in. <em>Subqueries<\/em>, also known as nested queries, are <em>SELECT<\/em> queries within the <em>WHERE<\/em> clause of another <em>SQL<\/em> query. The main <em>SQL<\/em> query then uses the result of the subquery.<\/p>\n\n\n\n<p>In this tutorial, we are going to discuss how to use subqueries in SQL, with reference to a few examples.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Subquery: A Guide<\/h2>\n\n\n\n<p>An SQL subquery is a query within another query. They are used to run a query that depends on the results of another query. Subqueries let you do this without having to write two separate queries and copy-paste the results. Subqueries appear in a WHERE or HAVING clause.<\/p>\n\n\n\n<p>Here is the syntax for a subquery in an SQL SELECT statement:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT name\nFROM products\nWHERE supplier_id\nIN (SELECT id FROM suppliers WHERE local = True);<\/pre><\/div>\n\n\n\n<p>This query selects the name of all products supplied by a local company. We use a subquery as an input to the <a href=\"https:\/\/careerkarma.com\/blog\/sql-in\/\">SQL IN statement<\/a>. The SQL IN statement returns all records from the &#8220;products&#8221; table where a supplier_id is in the results of our subquery.<\/p>\n\n\n\n<p>We can use subqueries in INSERT, UPDATE, and DELETE statements.<\/p>\n\n\n\n<p>A subquery must appear in parentheses. This distinguishes the inside of a subquery with another subquery.<\/p>\n\n\n\n<p>You should make sure you select the relevant data in your subquery. In our subquery above, we selected the <em>id<\/em> from the <em>suppliers<\/em> table. If we had selected another column, our query would not work. This is because our main query depends on the supplier ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Subquery Example: SELECT<\/h2>\n\n\n\n<p>Say you want to get a list of students who were on the honor roll, you could use a <em>subquery<\/em>. This assumes the honor roll information is in another table.<\/p>\n\n\n\n<p>Let\u2019s use an example to illustrate how <em>SQL subqueries<\/em> work. The following query will return a list of all customers who have made an order worth over $200:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT * FROM customers\nWHERE id IN (SELECT DISTINCT customer_id FROM orders\n\t\tWHERE cost &gt; 200);<\/pre><\/div>\n\n\n\n<p>Our <em>subquery<\/em> returns the following:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>name<\/td><td>email<\/td><td>address<\/td><td>loyalty_plan<\/td><td>id<\/td><\/tr><tr><td>Katy<\/td><td>katy.l@gmail.com<\/td><td>Mountain View, CA<\/td><td>None<\/td><td>4<\/td><\/tr><tr><td>John<\/td><td>john.p@outlook.com<\/td><td>Boston, MA<\/td><td>None<\/td><td>1<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>(2 rows)<\/p>\n\n\n\n<p>On the first line, we select every column from our <em>customers<\/em> table. Then, we specify that we only want to get customers whose customer ID is in a <em>subquery<\/em>. Our <em>subquery<\/em> selects all unique customer IDs from our <em>orders<\/em> table where the item cost more than $200. Records matching these conditions includes those customers in the results.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Subquery: INSERT<\/h2>\n\n\n\n<p>We want to insert all the records of customers who have made a purchase worth over $200 into a table called <em>high_value_customers.<\/em> To do so, we can use an SQL subquery and an <a href=\"https:\/\/careerkarma.com\/blog\/sql-insert\/\">SQL INSERT command<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>INSERT INTO high_value_customers\nSELECT * FROM customers\nWHERE id IN (SELECT DISTINCT customer_id FROM orders\n\t\tWHERE cost &gt; 200);<\/pre><\/div>\n\n\n\n<p>If we query our <em>high_value_customers<\/em> table, we can see all of our high value customers in one table:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>name<\/td><td>email<\/td><td>address<\/td><td>loyalty_plan<\/td><td>id<\/td><\/tr><tr><td>Katy<\/td><td>katy.l@gmail.com<\/td><td>Mountain View, CA<\/td><td>Gold<\/td><td>4<\/td><\/tr><tr><td>John<\/td><td>john.p@outlook.com<\/td><td>Boston, MA<\/td><td>None<\/td><td>1<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>(2 rows)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Subquery: UPDATE<\/h2>\n\n\n\n<p>We could use a <em>subquery<\/em> to update data within a table. For example, say we want to update the loyalty plans of all customers who have made a high-value purchase to <em>Bronze<\/em>. We could use the following query to perform that operation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>UPDATE customers\nSET loyalty_plan = 'High Value'\nWHERE id IN (SELECT DISTINCT customer_id FROM orders\n\t\tWHERE cost &gt; 200);<\/pre><\/div>\n\n\n\n<p>When we query our <em>customers<\/em> table, we can see that the loyalty plans for our two <em>high value<\/em> customers have been updated:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>name<\/td><td>email<\/td><td>address<\/td><td>loyalty_plan<\/td><td>id<\/td><\/tr><tr><td>Katy<\/td><td>katy.l@gmail.com<\/td><td>Mountain View, CA<\/td><td>High Value<\/td><td>4<\/td><\/tr><tr><td>John<\/td><td>john.p@outlook.com<\/td><td>Boston, MA<\/td><td>High Value<\/td><td>1<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>(2 rows)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Subquery: DELETE<\/h2>\n\n\n\n<p>You can use <em>subqueries<\/em> with the <a href=\"https:\/\/careerkarma.com\/blog\/sql-delete-row\/\">SQL DELETE statement<\/a> to delete individual or multiple rows in a table.<\/p>\n\n\n\n<p>Let&#8217;s write a command that deletes the orders of high value customers, which we moved to a new table in the database. To do this, we will need to depend on a subquery:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>DELETE FROM orders\nWHERE customer_id IN (SELECT id FROM customers\nWHERE loyalty_plan = 'High Value');<\/pre><\/div>\n\n\n\n<p>We can see all the orders from our high value customers have been deleted. Our nested subquery returns:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>id<\/td><td>item_name<\/td><td>cost<\/td><td>customer_id<\/td><\/tr><tr><td>5<\/td><td>Oak Chair<\/td><td>100<\/td><td>3<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>(1 row)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>An SQL subquery is a query within another query. Subqueries let you depend on the result of one query in another. Subqueries are specified in the HAVING or WHERE clauses of an SQL statement.<\/p>\n\n\n\n<p><em>Subqueries<\/em> make it easy to run a query that depends on the result of another query. In this guide, we have discussed how to write a <em>subquery<\/em> on an <em>SQL<\/em> server. We also talked about how to use subqueries in <em>SELECT<\/em>, <em>INSERT<\/em>, <em>UPDATE<\/em>, and <em>DELETE SQL<\/em> statements.<\/p>\n\n\n\n<p>Do you want to learn more about coding in SQL? Check out our <a href=\"https:\/\/careerkarma.com\/blog\/learn-sql\/\">How to Learn SQL guide<\/a>. This guide contains expert advice on learning SQL. You&#8217;ll also find a list of top courses to help you continue your learning journey.<\/p>\n","protected":false},"excerpt":{"rendered":"An SQL subquery is a query inside another query. It is used in the WHERE or HAVING clause of an SQL statement. Subqueries let you specify the results of one query as an argument in another query. When you\u2019re writing an SQL query, you may want to specify a parameter based on the result of&hellip;","protected":false},"author":240,"featured_media":12381,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17284],"tags":[],"class_list":{"0":"post-12380","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-sql"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"SQL","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Subquery: A Complete Guide: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Subquery: A Complete Guide\" \/>\n<meta property=\"og:description\" content=\"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-13T18:55:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:08:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"SQL Subquery: A Complete Guide\",\"datePublished\":\"2021-01-13T18:55:07+00:00\",\"dateModified\":\"2023-12-01T12:08:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\"},\"wordCount\":872,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg\",\"articleSection\":[\"SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\",\"name\":\"SQL Subquery: A Complete Guide: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg\",\"datePublished\":\"2021-01-13T18:55:07+00:00\",\"dateModified\":\"2023-12-01T12:08:04+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/sql-subquery\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-subquery\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL\",\"item\":\"https:\/\/careerkarma.com\/blog\/sql\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Subquery: A Complete Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Subquery: A Complete Guide: A Complete Guide | Career Karma","description":"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.","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:\/\/careerkarma.com\/blog\/sql-subquery\/","og_locale":"en_US","og_type":"article","og_title":"SQL Subquery: A Complete Guide","og_description":"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.","og_url":"https:\/\/careerkarma.com\/blog\/sql-subquery\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-01-13T18:55:07+00:00","article_modified_time":"2023-12-01T12:08:04+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"SQL Subquery: A Complete Guide","datePublished":"2021-01-13T18:55:07+00:00","dateModified":"2023-12-01T12:08:04+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/"},"wordCount":872,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg","articleSection":["SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/sql-subquery\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/","url":"https:\/\/careerkarma.com\/blog\/sql-subquery\/","name":"SQL Subquery: A Complete Guide: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg","datePublished":"2021-01-13T18:55:07+00:00","dateModified":"2023-12-01T12:08:04+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"SQL subqueries can be used to write SQL queries that depend on the results from another query. Learn how SQL Subqueries work in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/sql-subquery\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/SQL-SUBQUERY.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/sql-subquery\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL","item":"https:\/\/careerkarma.com\/blog\/sql\/"},{"@type":"ListItem","position":3,"name":"SQL Subquery: A Complete Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12380"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12380\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12381"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}