{"id":611,"date":"2018-02-15T12:07:50","date_gmt":"2018-02-15T17:07:50","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=611"},"modified":"2021-09-16T14:57:58","modified_gmt":"2021-09-16T18:57:58","slug":"database-administration-fundamentals-ws18sql1001-day-3","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=611","title":{"rendered":"Database Administration Fundamentals (WS18SQL1001) \u2013 Day 3"},"content":{"rendered":"<p>We have started having fun with built-in\u00a0<a title=\"SQL Server: Functions - Listed by Category\" href=\"https:\/\/www.techonthenet.com\/sql_server\/functions\/index.php\" target=\"_blank\" rel=\"noopener\">functions<\/a>\u00a0(set of instructions) for numeric values.<\/p>\n<ol>\n<li><a title=\"SQL Server: SUM Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/sum.php\" target=\"_blank\" rel=\"noopener\"><tt>SUM()<\/tt><\/a> &#8212; total value of row<\/li>\n<li><a title=\"SQL Server: AVG Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/avg.php\" target=\"_blank\" rel=\"noopener\"><tt>AVG()<\/tt><\/a> &#8212; average value of a row<\/li>\n<li><a title=\"SQL Server: COUNT Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/count.php\" target=\"_blank\" rel=\"noopener\"><tt>COUNT()<\/tt><\/a> &#8212; how many records<\/li>\n<li><a title=\"SQL Server: ROUND Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/round.php\" target=\"_blank\" rel=\"noopener\"><tt>ROUND()<\/tt><\/a> &#8212; rounding a number to a specific decimal point (decimal, float, double, money&#8230;)<\/li>\n<li><a title=\"SQL Server: CEILING Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/ceiling.php\" target=\"_blank\" rel=\"noopener\"><tt>CEILING()<\/tt><\/a> &#8212; rounding up to the closest whole number value (integer)<\/li>\n<li><a title=\"SQL Server: FLOOR Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/floor.php\" target=\"_blank\" rel=\"noopener\"><tt>FLOOR()<\/tt><\/a> &#8212; rounding down to the closest whole number value (integer)<\/li>\n<li><a title=\"SQL Server: MAX Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/max.php\" target=\"_blank\" rel=\"noopener\"><tt>MAX()<\/tt><\/a> &#8212; highest value<\/li>\n<li><a title=\"SQL Server: MIN Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/min.php\" target=\"_blank\" rel=\"noopener\"><tt>MIN()<\/tt><\/a> &#8212; lowest value<\/li>\n<li><a title=\"SQL Server: RAND Function\" href=\"http:\/\/www.techonthenet.com\/sql_server\/functions\/rand.php\" target=\"_blank\" rel=\"noopener\"><tt>RAND()<\/tt><\/a> &#8212; random value<\/li>\n<li><tt>FORMAT()<\/tt> &#8212; <em>&#8220;dress&#8221;<\/em> value for date or currency ($5.00, 2\/14\/2018, 14-FEB-18); outputs <tt>VARCHAR(n)<\/tt><\/li>\n<\/ol>\n<p>Download the\u00a0<a title=\"Class Notes for SF17SQL1001 - Day 3 (2018\/02\/14)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2018\/02\/WS18SQL1001_20180214.pdf\">notes<\/a>\u00a0for day 3.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have started having fun with built-in\u00a0functions\u00a0(set of instructions) for numeric values. SUM() &#8212; total value of row AVG() &#8212; average value of a row COUNT() &#8212; how many records ROUND() &#8212; rounding a number to a specific decimal point (decimal, float, double, money&#8230;) CEILING() &#8212; rounding up to the closest whole number value (integer) [&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-611","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\/611","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=611"}],"version-history":[{"count":4,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/611\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/611\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}