{"id":647,"date":"2018-05-24T11:22:29","date_gmt":"2018-05-24T15:22:29","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=647"},"modified":"2021-09-16T14:57:53","modified_gmt":"2021-09-16T18:57:53","slug":"database-administration-fundamentals-ws18sql1002-day-2","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=647","title":{"rendered":"Database Administration Fundamentals (WS18SQL1002) \u2013 Day 2"},"content":{"rendered":"<p>It is only day 2, but we have already covered how to retrieve fields from multiple tables<\/p>\n<pre>SELECT field1, field2 ...\r\nFROM table1\r\nINNER|LEFT|RIGHT JOIN table2\r\n  ON table1.shared_field1 = table2.shared_field1\r\n  AND table1.shared_field2 = table2.shared_field2\r\n  ...\r\nINNER|LEFT|RIGHT JOIN table3\r\n  ON table1.shared_field1 = table3.shared_field1\r\n  AND table1.shared_field2 = table3.shared_field2\r\n  ...\r\n<\/pre>\n<p>and built-in functions both for strings and numeric values (aggregate).<\/p>\n<p>Download the\u00a0<a title=\"Class Notes for WS18SQL1002 - Day 2 (2018\/05\/23)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2018\/05\/WS18SQL1002_20180523.pdf\">class notes<\/a>\u00a0for day 2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is only day 2, but we have already covered how to retrieve fields from multiple tables SELECT field1, field2 &#8230; FROM table1 INNER|LEFT|RIGHT JOIN table2 ON table1.shared_field1 = table2.shared_field1 AND table1.shared_field2 = table2.shared_field2 &#8230; INNER|LEFT|RIGHT JOIN table3 ON table1.shared_field1 = table3.shared_field1 AND table1.shared_field2 = table3.shared_field2 &#8230; and built-in functions both for strings and numeric [&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":[22,3,1,17,2],"tags":[],"class_list":["post-647","post","type-post","status-publish","format-standard","hentry","category-ws18sql1002","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\/647","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=647"}],"version-history":[{"count":3,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/647\/revisions"}],"predecessor-version":[{"id":651,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/647\/revisions\/651"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}