{"id":39412,"date":"2022-04-01T05:11:51","date_gmt":"2022-04-01T04:11:51","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=39412"},"modified":"2022-04-01T05:13:44","modified_gmt":"2022-04-01T04:13:44","slug":"table-views","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/advanced-topics\/table-views\/?lang=ja","title":{"rendered":"\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u3067\u306f\u30011\u3064\u4ee5\u4e0a\u306e\u30c7\u30fc\u30bf\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3057\u3066\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u5b9a\u7fa9\u306f\u3001\u5fc5\u8981\u306a\u7d50\u5408\u3092\u4f7f\u7528\u3057\u30661\u3064\u4ee5\u4e0a\u306e\u30c7\u30fc\u30bf\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u305f\u3081\u306e\u30af\u30a8\u30ea\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"i\">\u5b9a\u7fa9<\/span><\/h2>\n<p>\u5217\u306e\u5b9a\u7fa9\u306b\u306f\u4ee5\u4e0b\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d3\u30e5\u30fc\u306e<strong>\u540d\u524d<\/strong>\u3002<\/li>\n<li>\u30d3\u30e5\u30fc\u306e<strong>\u8aac\u660e<\/strong><\/li>\n<li>\u30d3\u30e5\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30dc\u30c3\u30c8\u3084\u30a2\u30d7\u30ea\u306e<strong>\u5272\u308a\u5f53\u3066<\/strong><br \/> <a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125645\/data_views.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28026\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125645\/data_views.png\" alt=\"\" width=\"1365\" height=\"291\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125645\/data_views.png 1365w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125645\/data_views-300x64.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125645\/data_views-1024x218.png 1024w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/a><\/li>\n<li>\u30d3\u30e5\u30fc\u306f\u3001<strong>\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb<\/strong>\u307e\u305f\u306f<strong>\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb<\/strong>\u304b\u3089\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n<ul>\n<li>\u3069\u3061\u3089\u306e\u30bf\u30a4\u30d7\u3067\u3082\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\u3002\n<ul>\n<li><strong>\u30c6\u30fc\u30d6\u30eb<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/li>\n<li>\u30d3\u30e5\u30fc\u306b\u542b\u3081\u308b<strong>\u5217<\/strong>\u3092\u9078\u629e\u3057\u307e\u3059\u3002<code>sum, avg, min, max and count<\/code>\u306a\u3069\u306e\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f7f\u7528\u4f8b\uff1a <code>count(&lt;table_name&gt;.&lt;column_name&gt;)<\/code><\/li>\n<li>\u4ee5\u4e0b\u3092\u4f7f\u7528\u3057\u3066\u7d50\u679c\u3092<strong>\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306e\u57fa\u6e96<\/strong>\n<ul>\n<li>\u5217\u540d &#8211; \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u304b\u3089\u9078\u629e\u3002<\/li>\n<li>\u6bd4\u8f03\u6f14\u7b97\u5b50 &#8211; \u300c=\u300d\u300c!\u300d\u300c&lt;\u300d\u300c&gt;\u300d\u304b\u3089\u9078\u629e<\/li>\n<li>\u6bd4\u8f03\u5024<\/li>\n<li>AND\/OR\u6f14\u7b97\u5b50\u3067\u63a5\u7d9a\u3055\u308c\u305f\u8907\u6570\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u57fa\u6e96\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u540c\u4e00\u306e\u30c7\u30fc\u30bf\u3092<code>&lt;table_name&gt;.&lt;column_name&gt;<\/code>\u306e\u3088\u3046\u306b\u30b0\u30eb\u30fc\u30d7\u5206\u3051\u3059\u308b\u305f\u3081\u306e<strong>\u30b0\u30eb\u30fc\u30d7<\/strong>\u5217<\/li>\n<li>\u7d50\u679c\u3092\u4e26\u3079\u66ff\u3048\u308b\u305f\u3081\u306e<strong>\u30bd\u30fc\u30c8<\/strong>\u5217 <code>&lt;table_name&gt;.&lt;column_name&gt; asc\/desc<\/code><\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125728\/data_views_single.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28028\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125728\/data_views_single.png\" alt=\"\" width=\"679\" height=\"693\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125728\/data_views_single.png 679w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125728\/data_views_single-294x300.png 294w\" sizes=\"auto, (max-width: 679px) 100vw, 679px\" \/><\/a><\/li>\n<li>\u307e\u305f\u3001\u8907\u6570\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067<strong>\u7d50\u5408<\/strong>\u57fa\u6e96\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<ul>\n<li>\u7d50\u5408\u3055\u308c\u308b<strong>\u30c6\u30fc\u30d6\u30eb<\/strong><\/li>\n<li><strong>\u7d50\u5408\u30bf\u30a4\u30d7<\/strong>\uff08\u5185\u5074\u3001\u53f3\u5916\u5074\u3001\u5de6\u5916\u5074\uff09<\/li>\n<li><strong>\u7d50\u5408\u5217<\/strong>\u2015\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u304b\u3089\u9078\u629e<\/li>\n<li>\u300c=\u300d\u300c!=\u300d\u300c&gt;\u300d\u300c&lt;\u300d\u306a\u3069\u306e\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066<strong>\u7d50\u5408\u57fa\u6e96<\/strong>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u8907\u6570\u306e\u7d50\u5408\u6761\u4ef6\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6700\u59274\u3064\u306e\u7d50\u5408\u6761\u4ef6\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125755\/data_views_mult.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28030\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125755\/data_views_mult.png\" alt=\"\" width=\"684\" height=\"899\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125755\/data_views_mult.png 684w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210624125755\/data_views_mult-228x300.png 228w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u3067\u306f\u30011\u3064\u4ee5\u4e0a\u306e\u30c7\u30fc\u30bf\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3057\u3066\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u5b9a\u7fa9\u306f\u3001\u5fc5\u8981\u306a\u7d50\u5408\u3092\u4f7f\u7528\u3057\u30661\u3064\u4ee5\u4e0a\u306e\u30c7\u30fc\u30bf\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u305f\u3081\u306e\u30af\u30a8\u30ea\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002 \u5b9a\u7fa9 \u5217\u306e\u5b9a\u7fa9\u306b\u306f\u4ee5\u4e0b\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u30d3\u30e5\u30fc\u306e\u540d\u524d\u3002 \u30d3\u30e5\u30fc\u306e\u8aac\u660e \u30d3\u30e5\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u30dc\u30c3\u30c8\u3084\u30a2\u30d7\u30ea\u306e\u5272\u308a\u5f53\u3066 \u30d3\u30e5\u30fc\u306f\u3001\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb\u307e\u305f\u306f\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3069\u3061\u3089\u306e\u30bf\u30a4\u30d7\u3067\u3082\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u30d3\u30e5\u30fc\u306b\u542b\u3081\u308b\u5217\u3092\u9078\u629e\u3057\u307e\u3059\u3002sum, avg, min, max and count\u306a\u3069\u306e\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f7f\u7528\u4f8b\uff1a count(&lt;table_name&gt;.&lt;column_name&gt;) \u4ee5\u4e0b\u3092\u4f7f\u7528\u3057\u3066\u7d50\u679c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306e\u57fa\u6e96 \u5217\u540d - \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u304b\u3089\u9078\u629e\u3002 \u6bd4\u8f03\u6f14\u7b97\u5b50 - \u300c=\u300d\u300c!\u300d\u300c&lt;\u300d\u300c&gt;\u300d\u304b\u3089\u9078\u629e \u6bd4\u8f03\u5024 AND\/OR\u6f14\u7b97\u5b50\u3067\u63a5\u7d9a\u3055\u308c\u305f\u8907\u6570\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u57fa\u6e96\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u540c\u4e00\u306e\u30c7\u30fc\u30bf\u3092&lt;table_name&gt;.&lt;column_name&gt;\u306e\u3088\u3046\u306b\u30b0\u30eb\u30fc\u30d7\u5206\u3051\u3059\u308b\u305f\u3081\u306e\u30b0\u30eb\u30fc\u30d7\u5217 \u7d50\u679c\u3092\u4e26\u3079\u66ff\u3048\u308b\u305f\u3081\u306e\u30bd\u30fc\u30c8\u5217 &lt;table_name&gt;.&lt;column_name&gt; asc\/desc \u307e\u305f\u3001\u8907\u6570\u30c6\u30fc\u30d6\u30eb\u30d3\u30e5\u30fc\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u7d50\u5408\u57fa\u6e96\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u7d50\u5408\u3055\u308c\u308b\u30c6\u30fc\u30d6\u30eb \u7d50\u5408\u30bf\u30a4\u30d7\uff08\u5185\u5074\u3001\u53f3\u5916\u5074\u3001\u5de6\u5916\u5074\uff09 \u7d50\u5408\u5217\u2015\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u304b\u3089\u9078\u629e \u300c=\u300d\u300c!=\u300d\u300c&gt;\u300d\u300c&lt;\u300d\u306a\u3069\u306e\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u7d50\u5408\u57fa\u6e96\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u8907\u6570\u306e\u7d50\u5408\u6761\u4ef6\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6700\u59274\u3064\u306e\u7d50\u5408\u6761\u4ef6\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-39412","post","type-post","status-publish","format-standard","hentry","category-advanced-topics"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/39412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=39412"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/39412\/revisions"}],"predecessor-version":[{"id":39413,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/39412\/revisions\/39413"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=39412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=39412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=39412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}