{"id":621,"date":"2018-02-27T11:22:56","date_gmt":"2018-02-27T16:22:56","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=621"},"modified":"2021-09-16T14:57:57","modified_gmt":"2021-09-16T18:57:57","slug":"database-administration-fundamentals-ws18sql1001-day-5","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=621","title":{"rendered":"Database Administration Fundamentals (WS18SQL1001) \u2013 Day 5"},"content":{"rendered":"<p>We are half-way done with the course. We have covered how to retrieve data from table(s) and how to present that data in comprehensible manner.<\/p>\n<pre>SELECT [DISTINCT] table1.field1,\r\n  table1.field2,\r\n  ...\r\n  table2.field1,\r\n  table2.field2,\r\n  ..\r\nFROM table1\r\nINNER|LEFT JOIN table2\r\n  ON table1.sharedfile1 = table2.sharedfile1\r\n    AND|OR table1.sharedfile2 = table2.sharedfile3\r\n    ...\r\nINNER|LEFT JOIN table3\r\n  ON table1.sharedfile1 = table3.sharedfile1\r\n    AND|OR table1.sharedfile2 = table3.sharedfile3\r\n    ...\r\nWHERE condition1\r\n  AND|OR condition2\r\n  ...\r\nGROUP BY fields_not_in_aggregate_function\r\nORDER BY field1,\r\n  field2\r\n  ...;\r\n<\/pre>\n<p>Download the\u00a0<a title=\"Class Notes for SF17SQL1001 - Day 5 (2018\/02\/26)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2018\/02\/WS18SQL1001_20180226.pdf\">notes<\/a>\u00a0for day 5.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are half-way done with the course. We have covered how to retrieve data from table(s) and how to present that data in comprehensible manner. SELECT [DISTINCT] table1.field1, table1.field2, &#8230; table2.field1, table2.field2, .. FROM table1 INNER|LEFT JOIN table2 ON table1.sharedfile1 = table2.sharedfile1 AND|OR table1.sharedfile2 = table2.sharedfile3 &#8230; INNER|LEFT JOIN table3 ON table1.sharedfile1 = table3.sharedfile1 AND|OR [&hellip;]<\/p>\n","protected":false},"author":7213,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"send_to_group_blog":0,"footnotes":""},"categories":[21,3,1,17,2],"tags":[],"class_list":["post-621","post","type-post","status-publish","format-standard","hentry","category-ws18sql1001","category-computer-programming","category-cuny","category-open-source","category-sql"],"_links":{"self":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/users\/7213"}],"replies":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=621"}],"version-history":[{"count":1,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/621\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/621\/revisions\/623"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}