{"id":32377,"date":"2021-01-16T11:37:26","date_gmt":"2021-01-16T11:37:26","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=32377"},"modified":"2022-03-11T05:14:13","modified_gmt":"2022-03-11T05:14:13","slug":"combining-data-and-queries","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/","title":{"rendered":"Combining Data and Queries"},"content":{"rendered":"\n<p>In order to explain the process of combining data, we use an scenario for better understanding.<\/p>\n\n\n\n<p>Let us take the data of various states, considered useful for building additional analysis efforts and queries. But on of the issue that arises is that much of the data provided uses a two-letter abbreviation for state codes and not the full name of the state. Now, you are required to associate state names with their abbreviations. Given, another public data source to combining data, a good amount of data shaping is required before we can connect it to our retirement table. <\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.microsoft.com\/en-us\/power-bi\/connect-data\/media\/desktop-shape-and-combine-data\/designer_gsg_usstateabbreviationsnavigator2.png\" alt=\"Navigator page\" width=\"584\" height=\"465\"\/><figcaption>Source: Microsoft<\/figcaption><\/figure><\/div>\n\n\n\n<p>Steps to shape the data, include &#8211; <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, from the&nbsp;<strong>Home<\/strong>&nbsp;ribbon in Query Editor, select&nbsp;<strong>New Source &gt; Web<\/strong>.<\/li><li>In the second step, enter the address of the website for state abbreviations, and then select&nbsp;<strong>Connect<\/strong>.<\/li><li>Then, the Navigator displays the content of the website.<\/li><li>Select&nbsp;<strong>Codes and abbreviations<\/strong>.<\/li><\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">Combining Queries<\/h6>\n\n\n\n<p>After shaping the data you get the StateCodes table required. Then, you may combine these two tables, or queries, into one. Since the tables we now have are a result of the queries we applied to the data, they\u2019re generally referred to as&nbsp;<em>queries<\/em>. Primarily, there are two ways to combine queries including <em>merging<\/em>&nbsp;and&nbsp;<em>appending<\/em>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You may merge the queries when you have one or more columns that you\u2019d like to add to another query.<\/li><li>Else you may append the query when you have additional rows of data that you\u2019d like to add to an existing query.<\/li><\/ul>\n\n\n\n<p>Steps merge the queries<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, from the left pane of Query Editor, select the query&nbsp;<em>into which<\/em>&nbsp;you want the other query to merge. In this case, it&#8217;s&nbsp;<strong>RetirementStats<\/strong>.<\/li><li>In the second step, select&nbsp;<strong>Combine &gt; Merge Queries<\/strong>&nbsp;from the&nbsp;<strong>Home<\/strong>&nbsp;tab on the ribbon.<\/li><li>Then, the&nbsp;<strong>Merge<\/strong>&nbsp;window appears. It prompts you to select which table you&#8217;d like merged into the selected table, and the matching columns to use for the merge.<\/li><li>Next, Select&nbsp;<strong>State<\/strong>&nbsp;from the RetirementStats table, then select the&nbsp;<strong>StateCodes<\/strong>&nbsp;query. When you select the correct matching columns, the&nbsp;<strong>OK<\/strong>&nbsp;button is enabled.<\/li><li>For expanding the merged table, and select which columns to include, select the expand icon <\/li><li>In this case, we want only the&nbsp;<strong>State Code<\/strong>&nbsp;column. Select that column, clear&nbsp;<strong>Use original column name as prefix<\/strong>, and then select&nbsp;<strong>OK<\/strong>.<\/li><li>Lastly, to apply your changes and close Query Editor, select&nbsp;<strong>Close &amp; Apply<\/strong>&nbsp;from the&nbsp;<strong>Home<\/strong>&nbsp;ribbon tab.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.testpreptraining.ai\/analyzing-data-with-microsoft-power-bi-da-100-free-test\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"150\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test.png\" alt=\"Microsoft Exam DA-100 Free Practice Test\" class=\"wp-image-31483\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test.png 961w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2021\/01\/Microsoft-Exam-DA-100-Free-Practice-Test-750x117.png 750w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In order to explain the process of combining data, we use an scenario for better understanding. Let us take the data of various states, considered useful for building additional analysis efforts and queries. But on of the issue that arises is that much of the data provided uses a two-letter abbreviation for state codes and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[174],"tags":[4029,4028,1830,3954],"class_list":["post-32377","page","type-page","status-publish","hentry","category-microsoft-azure","tag-combinig-queries","tag-combining-data","tag-da-100-study-guide","tag-microsoft-exam-da-100-free-practice-test"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Combining Data and Queries - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!\" \/>\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.testpreptraining.ai\/tutorial\/combining-data-and-queries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Combining Data and Queries - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-11T05:14:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/docs.microsoft.com\/en-us\/power-bi\/connect-data\/media\/desktop-shape-and-combine-data\/designer_gsg_usstateabbreviationsnavigator2.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\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/\",\"name\":\"Combining Data and Queries - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2021-01-16T11:37:26+00:00\",\"dateModified\":\"2022-03-11T05:14:13+00:00\",\"description\":\"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Combining Data and Queries\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Combining Data and Queries - Testprep Training Tutorials","description":"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!","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.testpreptraining.ai\/tutorial\/combining-data-and-queries\/","og_locale":"en_US","og_type":"article","og_title":"Combining Data and Queries - Testprep Training Tutorials","og_description":"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-11T05:14:13+00:00","og_image":[{"url":"https:\/\/docs.microsoft.com\/en-us\/power-bi\/connect-data\/media\/desktop-shape-and-combine-data\/designer_gsg_usstateabbreviationsnavigator2.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/","name":"Combining Data and Queries - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2021-01-16T11:37:26+00:00","dateModified":"2022-03-11T05:14:13+00:00","description":"Learn about Combining Data and Queries with online Tutorial and Practice test. Start preparing for Microsoft Exam DA-100 Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/combining-data-and-queries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Combining Data and Queries"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=32377"}],"version-history":[{"count":4,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32377\/revisions"}],"predecessor-version":[{"id":52588,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/32377\/revisions\/52588"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=32377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=32377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=32377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}