{"id":5917,"date":"2021-02-25T02:45:17","date_gmt":"2021-02-25T02:45:17","guid":{"rendered":"https:\/\/www.codebee.co.th\/labs\/?p=5917"},"modified":"2021-03-02T12:40:07","modified_gmt":"2021-03-02T12:40:07","slug":"mysql-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87-max-min-count-sum-avg","status":"publish","type":"post","link":"https:\/\/www.codebee.co.th\/labs\/mysql-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%84%e0%b8%b3%e0%b8%aa%e0%b8%b1%e0%b9%88%e0%b8%87-max-min-count-sum-avg\/","title":{"rendered":"MySQL \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 MAX,MIN,COUNT,SUM,AVG"},"content":{"rendered":"\n<p>\u0e41\u0e19\u0e30\u0e19\u0e33 4 \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e43\u0e19 MySQL \u0e17\u0e35\u0e48\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e41\u0e25\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e41\u0e19\u0e48\u0e19\u0e2d\u0e19 \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e15\u0e32\u0e21\u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07\u0e04\u0e23\u0e31\u0e1a<\/p>\n\n\n\n<p><strong>COUNT<\/strong> \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e19\u0e31\u0e1a row \u0e2b\u0e23\u0e37\u0e2d\u0e19\u0e31\u0e1a\u0e41\u0e16\u0e27\u0e27\u0e48\u0e32\u0e21\u0e35\u0e08\u0e33\u0e19\u0e27\u0e19\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e40\u0e17\u0e48\u0e32\u0e44\u0e2b\u0e23\u0e48 <\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 count \u0e43\u0e19\u0e01\u0e32\u0e23\u0e19\u0e31\u0e1a\u0e08\u0e33\u0e19\u0e27\u0e19\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07 products<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT <strong>COUNT<\/strong>(id) AS product_total FROM products<\/code><\/pre>\n\n\n\n<p><br><strong>MAX<\/strong> \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e2b\u0e32 row \u0e17\u0e35\u0e48\u0e21\u0e35\u0e04\u0e48\u0e32\u0e2a\u0e39\u0e07\u0e2a\u0e38\u0e14\u0e08\u0e32\u0e01 Field \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 <\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 MAX \u0e43\u0e19\u0e01\u0e32\u0e23\u0e2b\u0e32\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e35\u0e48\u0e23\u0e32\u0e04\u0e32\u0e2a\u0e39\u0e07\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT <strong>MAX<\/strong>(price) AS max_price FROM products<\/code><\/pre>\n\n\n\n<p><br><strong>MIN<\/strong> \u0e04\u0e37\u0e2d\u0e15\u0e23\u0e07\u0e02\u0e49\u0e32\u0e21\u0e01\u0e31\u0e1a MAX \u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2b\u0e32 row \u0e17\u0e35\u0e48\u0e21\u0e35\u0e04\u0e48\u0e32\u0e19\u0e49\u0e2d\u0e22\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14\u0e08\u0e32\u0e01 Field \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38<\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 MIN \u0e43\u0e19\u0e01\u0e32\u0e23\u0e2b\u0e32\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e35\u0e48\u0e23\u0e32\u0e04\u0e32\u0e16\u0e39\u0e01\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT <strong>MIN<\/strong>(price) AS min_price FROM products<\/code><\/pre>\n\n\n\n<p><br><strong>SUM<\/strong> \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e23\u0e27\u0e21 \u0e2b\u0e23\u0e37\u0e2d\u0e1a\u0e27\u0e01\u0e04\u0e48\u0e32\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 row \u0e08\u0e32\u0e01 Field \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38<\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 SUM \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e14\u0e39\u0e21\u0e39\u0e25\u0e04\u0e48\u0e32\u0e42\u0e14\u0e22\u0e23\u0e27\u0e21\u0e02\u0e2d\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07 products<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT <strong>SUM<\/strong>(price) AS sum_price FROM products<\/code><\/pre>\n\n\n\n<p><br><strong>AVG<\/strong> \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e2b\u0e32\u0e04\u0e48\u0e32\u0e40\u0e09\u0e25\u0e35\u0e22\u0e02\u0e2d\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 row \u0e08\u0e32\u0e01 Field \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38<\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 AVG \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e14\u0e39\u0e27\u0e48\u0e32\u0e23\u0e32\u0e04\u0e32\u0e02\u0e2d\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07 products \u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e19\u0e31\u0e49\u0e19\u0e42\u0e14\u0e22\u0e40\u0e09\u0e25\u0e35\u0e48\u0e22\u0e41\u0e25\u0e49\u0e27\u0e23\u0e32\u0e04\u0e32\u0e2d\u0e22\u0e39\u0e48\u0e17\u0e35\u0e48\u0e1b\u0e23\u0e30\u0e21\u0e32\u0e13\u0e40\u0e17\u0e48\u0e32\u0e44\u0e2b\u0e23\u0e48<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT <strong>AVG<\/strong>(price) AS avg_price FROM products<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e41\u0e19\u0e30\u0e19\u0e33 4 \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e43\u0e19 MySQL \u0e17\u0e35\u0e48\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e41\u0e25\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e41\u0e19\u0e48\u0e19\u0e2d\u0e19 \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e15\u0e32\u0e21\u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07\u0e04\u0e23\u0e31\u0e1a COUNT \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e19\u0e31\u0e1a row \u0e2b\u0e23\u0e37\u0e2d\u0e19\u0e31\u0e1a\u0e41\u0e16\u0e27\u0e27\u0e48\u0e32\u0e21\u0e35\u0e08\u0e33\u0e19\u0e27\u0e19\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e40\u0e17\u0e48\u0e32\u0e44\u0e2b\u0e23\u0e48 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 count \u0e43\u0e19\u0e01\u0e32\u0e23\u0e19\u0e31\u0e1a\u0e08\u0e33\u0e19\u0e27\u0e19\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07 products MAX \u0e04\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e2b\u0e32 row \u0e17\u0e35\u0e48\u0e21\u0e35\u0e04\u0e48\u0e32\u0e2a\u0e39\u0e07\u0e2a\u0e38\u0e14\u0e08\u0e32\u0e01 Field \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5921,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[1677,2428,2429,2268,2426,2427,2430],"class_list":["post-5917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website-development-","tag-mysql","tag-mysql-avg","tag-mysql-count","tag-mysql-database","tag-mysql-max","tag-mysql-min","tag-mysql-sum"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/5917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/comments?post=5917"}],"version-history":[{"count":5,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/5917\/revisions"}],"predecessor-version":[{"id":5923,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/5917\/revisions\/5923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media\/5921"}],"wp:attachment":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media?parent=5917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/categories?post=5917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/tags?post=5917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}