{"id":29225,"date":"2021-07-30T10:45:51","date_gmt":"2021-07-30T09:45:51","guid":{"rendered":"https:\/\/multisite.korebots.com\/v9-0\/?p=29225"},"modified":"2021-07-30T10:45:51","modified_gmt":"2021-07-30T09:45:51","slug":"table-views","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/v9-0\/docs\/bots\/advanced-topics\/table-views\/","title":{"rendered":"Table Views"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>Table Views let you create custom datasets by joining one or more Data Tables. These definitions get converted to queries to extract data from one or more data tables by using the required joins.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Definition\"><\/span>Definition<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>View definition includes:<\/p>\n<ul>\n<li><strong>Name<\/strong> for the view.<\/li>\n<li><strong>Description<\/strong> of the view<\/li>\n<li><strong>Assignment<\/strong> of Bot and Apps to access the View<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125645\/data_views.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28026\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125645\/data_views.png\" alt=\"\" width=\"1365\" height=\"291\" \/><\/a><\/li>\n<li>A View can be built from a <strong>Single Table<\/strong> or <strong>Multiple Tables<\/strong>.\n<ul>\n<li>For both types,\u00a0you need to\n<ul>\n<li>select the <strong>table;<\/strong><\/li>\n<li>select the <strong>columns<\/strong> to be included in the view, you can use aggregation functions like <code>sum, avg, min, max and count<\/code>. Usage example: <code>count(&lt;table_name&gt;.&lt;column_name&gt;)<\/code><\/li>\n<li>the <strong>criteria for filtering<\/strong> the results using\n<ul>\n<li>column name &#8211; select from the drop-down list;<\/li>\n<li>comparison operator &#8211; select from =, !=, &lt; or &gt;<\/li>\n<li>comparison value<\/li>\n<li>you can have multiple filter criteria connected by AND\/OR operators<\/li>\n<\/ul>\n<\/li>\n<li>the <strong>Group By<\/strong> columns for arranging the identical data into groups as <code>&lt;table_name&gt;.&lt;column_name&gt;<\/code>, and<\/li>\n<li>the <strong>Sort By<\/strong> columns to order the results as <code>&lt;table_name&gt;.&lt;column_name&gt; asc\/desc<\/code><\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125728\/data_views_single.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28028\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125728\/data_views_single.png\" alt=\"\" width=\"679\" height=\"693\" \/><\/a><\/li>\n<li>In addition, for multiple tables view, you need to specify the <strong>Join<\/strong> criteria by configuring\n<ul>\n<li><strong>Table<\/strong> to be joined;<\/li>\n<li>the\u00a0<strong>type of join<\/strong>&#8211; inner, right outer or left outer;<\/li>\n<li>the <strong>join columns<\/strong> &#8211; pick from the drop-down list and<\/li>\n<li>specify the <strong>join criteria<\/strong> using the operation =, !=, &gt; or &lt; operators.<\/li>\n<li>You can have multiple Join Rules. You can have up to 4 join rules.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125755\/data_views_mult.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28030\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210624125755\/data_views_mult.png\" alt=\"\" width=\"684\" height=\"899\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div><\/div><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 class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Table Views let you create custom datasets by joining one or more Data Tables. These definitions get converted to queries to extract data from one or more data tables by using the required joins. Definition View definition includes: Name for the view. Description of the view Assignment of Bot and Apps to access the View...","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/29225"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/comments?post=29225"}],"version-history":[{"count":1,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/29225\/revisions"}],"predecessor-version":[{"id":29234,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/29225\/revisions\/29234"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/media?parent=29225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/categories?post=29225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/tags?post=29225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}