{"id":7089,"date":"2018-08-30T05:54:18","date_gmt":"2018-08-30T12:54:18","guid":{"rendered":"http:\/\/www.mysqltutorial.org\/?page_id=7089"},"modified":"2024-01-04T06:40:07","modified_gmt":"2024-01-04T13:40:07","slug":"mysql-cume_dist-function","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/","title":{"rendered":"MySQL CUME_DIST Function"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the MySQL <code>CUME_DIST()<\/code> function to calculate cumulative distribution value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overview of MySQL CUME_DIST()\u00a0Function<\/h2>\n\n\n\n<p>The <code>CUME_DIST()<\/code> is a <a href=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/\">window function<\/a> that returns the cumulative distribution of a value within a set of values. It represents the number of rows with values less than or equal to that row&#8217;s value divided by the total number of rows.<\/p>\n\n\n\n<p>The returned value of the <code>CUME_DIST()<\/code> function is greater than zero and less than or equal to one (0 &lt; <code>CUME_DIST()<\/code> &lt;= 1). The repeated column values receive the same <code>CUME_DIST()<\/code> value.<\/p>\n\n\n\n<p>The following shows the syntax of the <code>CUME_DIST()<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">CUME_DIST() \nOVER (\n   PARTITION BY expr\n   ORDER BY expr &#91;ASC | DESC]\n)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this syntax: <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PARTITION BY<\/h3>\n\n\n\n<p>The \u00a0<code>PARTITION BY<\/code>\u00a0clause divides the result set into partitions to which the <code>CUME_DIST()<\/code> function is applied independently. If you omit the PARTITION BY clause, the function is applied to the whole result set.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ORDER BY<\/h3>\n\n\n\n<p>The <code>ORDER BY<\/code> clause specifies the order of the rows in each partition or the whole result set in case the <code>PARTITION BY<\/code> is omitted. <\/p>\n\n\n\n<p>The <code>CUME_DIST()<\/code> function calculates the cumulative distribution value of each row based on its order in the partition.<\/p>\n\n\n\n<p>The approximate formula of the <code>CUME_DIST()<\/code> function is as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">ROW_NUMBER() \/ total_rows<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">MySQL CUME_DIST() function example<\/h2>\n\n\n\n<p>Let&#8217;s <a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-create-table\/\">create a table<\/a> called <code>scores<\/code> and populate some data for the demonstration:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">TABLE<\/span> scores (\n    <span class=\"hljs-keyword\">name<\/span> <span class=\"hljs-built_in\">VARCHAR<\/span>(<span class=\"hljs-number\">20<\/span>) PRIMARY <span class=\"hljs-keyword\">KEY<\/span>,\n    score <span class=\"hljs-built_in\">INT<\/span> <span class=\"hljs-keyword\">NOT<\/span> <span class=\"hljs-literal\">NULL<\/span>\n);\n\n<span class=\"hljs-keyword\">INSERT<\/span> <span class=\"hljs-keyword\">INTO<\/span>\n\tscores(<span class=\"hljs-keyword\">name<\/span>, score)\n<span class=\"hljs-keyword\">VALUES<\/span>\n\t(<span class=\"hljs-string\">'Smith'<\/span>,<span class=\"hljs-number\">81<\/span>),\n\t(<span class=\"hljs-string\">'Jones'<\/span>,<span class=\"hljs-number\">55<\/span>),\n\t(<span class=\"hljs-string\">'Williams'<\/span>,<span class=\"hljs-number\">55<\/span>),\n\t(<span class=\"hljs-string\">'Taylor'<\/span>,<span class=\"hljs-number\">62<\/span>),\n\t(<span class=\"hljs-string\">'Brown'<\/span>,<span class=\"hljs-number\">62<\/span>),\n\t(<span class=\"hljs-string\">'Davies'<\/span>,<span class=\"hljs-number\">84<\/span>),\n\t(<span class=\"hljs-string\">'Evans'<\/span>,<span class=\"hljs-number\">87<\/span>),\n\t(<span class=\"hljs-string\">'Wilson'<\/span>,<span class=\"hljs-number\">72<\/span>),\n\t(<span class=\"hljs-string\">'Thomas'<\/span>,<span class=\"hljs-number\">72<\/span>),\n\t(<span class=\"hljs-string\">'Johnson'<\/span>,<span class=\"hljs-number\">100<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The following statement uses the <code>CUME_DIST()<\/code> function to find the cumulative distribution of the score in the result set:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  <span class=\"hljs-keyword\">name<\/span>, \n  score, \n  ROW_NUMBER() <span class=\"hljs-keyword\">OVER<\/span> (\n    <span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> \n      score\n  ) row_num, \n  <span class=\"hljs-keyword\">CUME_DIST<\/span>() <span class=\"hljs-keyword\">OVER<\/span> (\n    <span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> \n      score\n  ) cume_dist_val \n<span class=\"hljs-keyword\">FROM<\/span> \n  scores;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here is the output:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"214\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png\" alt=\"MySQL CUME_DIST Function Example\" class=\"wp-image-7090\" title=\"MySQL CUME_DIST Function Example\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png 263w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example-200x163.png 200w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/figure>\n\n\n\n<p>In this example, the score is sorted in ascending order from 55 to 100. Note that the <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-row_number-function\/\">ROW_NUMBER()<\/a><\/code> function was added for reference.<\/p>\n\n\n\n<p>So how does the <code>CUME_DIST()<\/code> function perform calculation?<\/p>\n\n\n\n<p>In the initial step, the function identifies the number of rows in the result set where the values are less than or equal to 55. This count is found to be 2 for the first row. Next, the <code>CUME_DIST()<\/code> function computes the cumulative distribution by dividing this count (2) by the total number of rows in the set, which is 10: 2\/10. The result is 0.2 or 20%. The same procedure is then repeated for the second row.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"268\" height=\"221\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-First-Row.png\" alt=\"MySQL CUME_DIST Function - First Row\" class=\"wp-image-7092\" title=\"MySQL CUME_DIST Function - First Row\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-First-Row.png 268w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-First-Row-200x165.png 200w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/figure>\n\n\n\n<p>In the case of the third row, the <code>CUME_DIST()<\/code> function identifies four rows within the result set where the values are less than or equal to 62. then, the <code>CUME_DIST()<\/code> function computes the cumulative distribution by dividing this count (4) by the total number of rows in the set, which is 10: 4\/10. The result is 0.4 or 40%.<\/p>\n\n\n\n<p>The same calculation logic is applied to the remaining rows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the MySQL <code>CUME_DIST()<\/code> function to calculate the cumulative distribution of a value in a set of values.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful? <\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"7089\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/\"\n\t\t\t\tdata-post-title=\"MySQL CUME_DIST Function\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"7089\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/\"\n\t\t\t\tdata-post-title=\"MySQL CUME_DIST Function\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":6941,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7089","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MySQL CUME_DIST() Function Explained By Examples<\/title>\n<meta name=\"description\" content=\"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL CUME_DIST() Function Explained By Examples\" \/>\n<meta property=\"og:description\" content=\"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-04T13:40:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/\",\"name\":\"MySQL CUME_DIST() Function Explained By Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/MySQL-CUME_DIST-Function-Example.png\",\"datePublished\":\"2018-08-30T12:54:18+00:00\",\"dateModified\":\"2024-01-04T13:40:07+00:00\",\"description\":\"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/MySQL-CUME_DIST-Function-Example.png\",\"contentUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/MySQL-CUME_DIST-Function-Example.png\",\"width\":263,\"height\":214,\"caption\":\"MySQL CUME_DIST Function Example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/mysql-cume_dist-function\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Window Functions\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-window-functions\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MySQL CUME_DIST Function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL CUME_DIST() Function Explained By Examples","description":"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/","og_locale":"en_US","og_type":"article","og_title":"MySQL CUME_DIST() Function Explained By Examples","og_description":"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values","og_url":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/","og_site_name":"MySQL Tutorial","article_modified_time":"2024-01-04T13:40:07+00:00","og_image":[{"url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/","url":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/","name":"MySQL CUME_DIST() Function Explained By Examples","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/#primaryimage"},"image":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png","datePublished":"2018-08-30T12:54:18+00:00","dateModified":"2024-01-04T13:40:07+00:00","description":"The MySQL CUME_DIST() is a window function that returns the cumulative distribution of a value within a set of values","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/#primaryimage","url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png","contentUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2018\/08\/MySQL-CUME_DIST-Function-Example.png","width":263,"height":214,"caption":"MySQL CUME_DIST Function Example"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/mysql-cume_dist-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Window Functions","item":"https:\/\/www.mysqltutorial.org\/mysql-window-functions\/"},{"@type":"ListItem","position":3,"name":"MySQL CUME_DIST Function"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/7089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=7089"}],"version-history":[{"count":3,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/7089\/revisions"}],"predecessor-version":[{"id":14186,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/7089\/revisions\/14186"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/6941"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=7089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}