{"id":697,"date":"2020-05-06T17:48:38","date_gmt":"2020-05-06T09:48:38","guid":{"rendered":"http:\/\/www.yohz.com\/blogs\/?p=697"},"modified":"2020-05-07T10:45:23","modified_gmt":"2020-05-07T02:45:23","slug":"697","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2020\/05\/06\/697\/","title":{"rendered":"Querying the used data sets in SQL Data Analysis"},"content":{"rendered":"<p>In <a href=\"https:\/\/www.yohz.com\/sda_details.htm\">SQL Data Analysis<\/a>, you can run queries on the data sets that you are using.\u00a0 For example, you may have retrieved a data set from a SQL Server database, and another data set from a PostgreSQL database.\u00a0 You can run a query to retrieve data from these 2 data sets as if they were tables in a database.<\/p>\n<p>To run an internal query, first click on the <strong>Run SQL query<\/strong> item in the main window.\u00a0 In our example, we have already ran and use data sets from SQL Server and PostgreSQL databases.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-699\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery01.png\" alt=\"\" width=\"977\" height=\"611\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery01.png 977w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery01-300x188.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery01-768x480.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery01-624x390.png 624w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/p>\n<p>Select the <strong>Query data sets<\/strong> item on the <strong>Database Connections<\/strong> panel on the left.\u00a0 There are 3 &#8216;tables&#8217; we can query from &#8211; ds1, ds2, and ds3.\u00a0 You can write a query to retrieve rows across these 3 tables e.g.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-700\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery02.png\" alt=\"\" width=\"704\" height=\"462\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery02.png 704w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery02-300x197.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/sda_vquery02-624x410.png 624w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/p>\n<p>The new data set can then be used in your analysis tables and pivot tables.<\/p>\n<p>The <a href=\"https:\/\/www.sqlite.org\/lang_select.html\">SQLite SQL syntax<\/a> is used for the internal query.\u00a0 Thus, you have access to almost all the standard SQL92 syntax, except for RIGHT OUTER JOIN and FULL OUTER JOIN.<\/p>\n<p>&nbsp;<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/06\/697\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/06\/697\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>In SQL Data Analysis, you can run queries on the data sets that you are using.\u00a0 For example, you may have retrieved a data set from a SQL Server database, and another data set from a PostgreSQL database.\u00a0 You can run a query to retrieve data from these 2 data sets as if they were [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[86],"tags":[94,93,87],"_links":{"self":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/697"}],"collection":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/comments?post=697"}],"version-history":[{"count":4,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/697\/revisions"}],"predecessor-version":[{"id":734,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/697\/revisions\/734"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}