{"id":8556,"date":"2020-05-14T05:12:00","date_gmt":"2020-05-14T05:12:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8556"},"modified":"2025-08-13T04:34:24","modified_gmt":"2025-08-13T04:34:24","slug":"how-to-get-cumulative-total-users-per-day-in-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/","title":{"rendered":"How to Get Cumulative Total Users Per Day in MySQL"},"content":{"rendered":"\n<p>Daily cumulative total users is a very useful KPI metric for analyzing user growth, for every business. However, since there is no built-in function to calculate running total in MySQL, here&#8217;s the SQL query to get cumulative total users per day, also known as rolling sum by date or running total of users.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#How_to_Get_Cumulative_Total_Users_Per_Day_in_MySQL\" >How to Get Cumulative Total Users Per Day in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#How_to_Get_Cumulative_Total_Users_Per_Week_in_MySQL\" >How to Get Cumulative Total Users Per Week in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#How_to_Get_Cumulative_Total_Users_Per_Month_in_MySQL\" >How to Get Cumulative Total Users Per Month in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#How_to_Get_Cumulative_Total_Users_Per_Quarter_in_MySQL\" >How to Get Cumulative Total Users Per Quarter in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#How_to_Get_Cumulative_Total_Users_Per_Year_in_MySQL\" >How to Get Cumulative Total Users Per Year in MySQL<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Cumulative_Total_Users_Per_Day_in_MySQL\"><\/span>How to Get Cumulative Total Users Per Day in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to get cumulative total users per day in MySQL. Let&#8217;s say you have the following table <em>users(date_joined,user_id)<\/em> that contains all the user ids with their date of registration\/sign up\/joining for your business.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table users(date_joined date,user_id int);\n\nmysql&gt; insert into users(date_joined,user_id)\n       values('2020-04-28',213),\n       ('2020-04-28',214),\n       ('2020-04-30',215),\n       ('2020-04-28',216),\n       ('2020-04-28',217),\n       ('2020-04-30',218),\n       ('2020-04-28',219),\n       ('2020-04-28',220),\n       ('2020-04-30',221),\n       ('2020-05-01',222),\n       ('2020-05-01',222),\n       ('2020-05-01',223),\n       ('2020-05-04',224),\n       ('2020-05-04',225),\n       ('2020-05-04',226),\n       ('2020-05-04',226),\n       ('2020-05-04',227),\n       ('2020-05-04',228),\n       ('2020-05-05',229),\n       ('2020-05-05',230),\n       ('2020-05-05',231),\n       ('2020-05-05',232),\n       ('2020-05-06',233),\n       ('2020-05-06', 234);\n\nmysql&gt; select * from users;\n+-------------+---------+\n| date_joined | user_id |\n+-------------+---------+\n| 2020-04-28  |     213 |\n| 2020-04-28  |     214 |\n| 2020-04-30  |     215 |\n| 2020-04-28  |     216 |\n| 2020-04-28  |     217 |\n| 2020-04-30  |     218 |\n| 2020-04-28  |     219 |\n| 2020-04-28  |     220 |\n| 2020-04-30  |     221 |\n| 2020-05-01  |     222 |\n| 2020-05-01  |     222 |\n| 2020-05-01  |     223 |\n| 2020-05-04  |     224 |\n| 2020-05-04  |     225 |\n| 2020-05-04  |     226 |\n| 2020-05-04  |     226 |\n| 2020-05-04  |     227 |\n| 2020-05-04  |     228 |\n| 2020-05-05  |     229 |\n| 2020-05-05  |     230 |\n| 2020-05-05  |     231 |\n| 2020-05-05  |     232 |\n| 2020-05-06  |     233 |\n| 2020-05-06  |     234 |\n+-------------+---------+\n<\/pre>\n\n\n\n<p>First, we look at an SQL query to calculate the daily number of sign ups<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select date(date_joined),count(user_id) \n       from users \n       group by date(date_joined);\n+-------------------+----------------+\n| date(date_joined) | count(user_id) |\n+-------------------+----------------+\n| 2020-04-28        |        6       |\n| 2020-04-30        |        3       |\n| 2020-05-01        |        3       |\n| 2020-05-04        |        6       |\n| 2020-05-05        |        4       |\n| 2020-05-06        |        2       |\n+-------------------+----------------+<\/pre>\n\n\n\n<p>Next, here&#8217;s the SQL query to get cumulative total users per day in MySQL. We will use the above SQL as a subquery to get running total in SQL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\n\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             <strong>select date(date_joined) as date_joined,count(user_id) as new_users\n             from users\n             group by date(date_joined)<\/strong>\n            ) as temp\n            order by date_joined;\n+-------------+-----------+-------------+\n| date_joined | new_users | total_users |\n+-------------+-----------+-------------+\n| 2020-04-28  |         6 |           6 |\n| 2020-04-30  |         3 |           9 |\n| 2020-05-01  |         3 |          12 |\n| 2020-05-04  |         6 |          18 |\n| 2020-05-05  |         4 |          22 |\n| 2020-05-06  |         2 |          24 |\n+-------------+-----------+-------------+\n<\/pre>\n\n\n\n<p>In the above query, we set a temporary variable csum to 0. Then for each row we use it to calculate and store the cumulative sum of users.<\/p>\n\n\n\n<p>After you get cumulative total users per day in MySQL, you can <a href=\"\/mysql-charts\">plot it on a line chart<\/a> or dashboard using a reporting tool like Ubiq and share it with your team. Here&#8217;s a line chart created using <a href=\"https:\/\/ubiq.co\">Ubiq<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"444\" src=\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/daily-new-users-total-users-1.webp?resize=677%2C444&#038;ssl=1\" alt=\"\" class=\"wp-image-8557\"\/><\/figure>\n<\/div>\n\n\n<p>If you want to get a conditional running total in MySQL, then you can add a WHERE clause in the subquery, as per your requirement.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             select date(date_joined) as date_joined,count(user_id) as new_users\n             from users \n<strong>             WHERE &lt;condition&gt;<\/strong>\n             group by date(date_joined)\n            ) as temp\n            order by date_joined;\n<\/pre>\n\n\n\n<p>You can easily modify the above SQL query, to calculate cumulative total users by week, month, quarter and year. Let us look at them one by one. We will use&nbsp;<a href=\"https:\/\/www.w3schools.com\/sql\/func_mysql_date_format.asp\" target=\"_blank\" rel=\"noreferrer noopener\">DATE_FORMAT<\/a> function to easily get week, month from date columns.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Cumulative_Total_Users_Per_Week_in_MySQL\"><\/span>How to Get Cumulative Total Users Per Week in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here&#8217;s the SQL query to get cumulative total users by week in MySQL. In the SQL query to get cumulative total users per day, you just need to change the aggregation function in subquery, from <em>date(date_joined)<\/em> to <em>date_format(date_format,&#8217;%U&#8217;)<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             select <strong>date_format(date_joined,'%U')<\/strong> as date_joined,\n               count(user_id) as new_users\n             from users\n             group by <strong>date_format(date_joined,'%U')<\/strong>\n            ) as temp\n            order by date_joined;\n<\/pre>\n\n\n\n<p>In the above query, you can also use WEEK function instead of DATE_FORMAT, that is, use WEEK(date_joined) instead of DATE_FORMAT(date_joined,&#8217;%U&#8217;)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Cumulative_Total_Users_Per_Month_in_MySQL\"><\/span>How to Get Cumulative Total Users Per Month in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here&#8217;s the SQL query to get cumulative total users by month in MySQL. In the SQL query to get cumulative total users per day, you just need to change the aggregation function in subquery, from <em>date(date_joined)<\/em> to <em>date_format(date_format,&#8217;%b&#8217;)<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\n\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             select <strong>date_format(date_joined,'%b')<\/strong> as date_joined,\n               count(user_id) as new_users\n             from users\n             group by <strong>date_format(date_joined,'%b')<\/strong>\n            ) as temp\n            order by date_joined;\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Cumulative_Total_Users_Per_Quarter_in_MySQL\"><\/span>How to Get Cumulative Total Users Per Quarter in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here&#8217;s the SQL query to get cumulative total users by quarter in MySQL. In the SQL query to get cumulative total users per day, you just need to change the aggregation function in subquery, from <em>date(date_joined)<\/em> to <em>quarter(date_format)<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             select <strong>quarter(date_joined)<\/strong> as date_joined,\n               count(user_id) as new_users\n             from users\n             group by <strong>quarter(date_joined)<\/strong>\n            ) as temp\n            order by date_joined;\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Cumulative_Total_Users_Per_Year_in_MySQL\"><\/span>How to Get Cumulative Total Users Per Year in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here&#8217;s the SQL query to get cumulative total users by year in MySQL. In the SQL query to get cumulative total users per day, you just need to change the aggregation function in subquery, from <em>date(date_joined)<\/em> to <em>year(date_format)<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; set @csum := 0;\nmysql&gt; select date_joined,new_users, (@csum := @csum + new_users) as total_users\n            from (\n             select <strong>year(date_joined)<\/strong> as date_joined,\n               count(user_id) as new_users\n             from users\n             group by <strong>year(date_joined)<\/strong>\n            ) as temp\n            order by date_joined;\n<\/pre>\n\n\n\n<p>That&#8217;s it! You can try the above SQL queries to get cumulative total users per day in MySQL.&nbsp;If you want to create charts, dashboards &amp; reports from MySQL database, you can try <a href=\"https:\/\/ubiq.co\">Ubiq<\/a>. We offer a 14-day free trial.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-calculate-revenue-in-mysql\/\">How to Calculate Revenue in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\">How to Duplicate Table in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\">How to Copy Table in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Daily Cumulative Total users is a useful metric to track user growth for every business. Here&#8217;s how to get cumulative total users per day in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":8564,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[491,492,493],"class_list":["post-8556","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-cumulative-total","tag-daily-users","tag-user-count"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Cumulative Total users is a useful metric to track user growth. Here&#039;s how to get cumulative total users per day in MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Cumulative Total users is a useful metric to track user growth. Here&#039;s how to get cumulative total users per day in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-14T05:12:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-13T04:34:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"697\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Get Cumulative Total Users Per Day in MySQL\",\"datePublished\":\"2020-05-14T05:12:00+00:00\",\"dateModified\":\"2025-08-13T04:34:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\"},\"wordCount\":595,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1\",\"keywords\":[\"cumulative total\",\"daily users\",\"user count\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\",\"name\":\"How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1\",\"datePublished\":\"2020-05-14T05:12:00+00:00\",\"dateModified\":\"2025-08-13T04:34:24+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Cumulative Total users is a useful metric to track user growth. Here's how to get cumulative total users per day in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1\",\"width\":697,\"height\":410,\"caption\":\"cumulative total user per day\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get Cumulative Total Users Per Day in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI","description":"Cumulative Total users is a useful metric to track user growth. Here's how to get cumulative total users per day in MySQL.","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:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI","og_description":"Cumulative Total users is a useful metric to track user growth. Here's how to get cumulative total users per day in MySQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-05-14T05:12:00+00:00","article_modified_time":"2025-08-13T04:34:24+00:00","og_image":[{"width":697,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp","type":"image\/webp"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Get Cumulative Total Users Per Day in MySQL","datePublished":"2020-05-14T05:12:00+00:00","dateModified":"2025-08-13T04:34:24+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/"},"wordCount":595,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1","keywords":["cumulative total","daily users","user count"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/","name":"How to Get Cumulative Total Users Per Day in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1","datePublished":"2020-05-14T05:12:00+00:00","dateModified":"2025-08-13T04:34:24+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Cumulative Total users is a useful metric to track user growth. Here's how to get cumulative total users per day in MySQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1","width":697,"height":410,"caption":"cumulative total user per day"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Get Cumulative Total Users Per Day in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/cumulative-total-user-per-day.webp?fit=697%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2e0","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=8556"}],"version-history":[{"count":2,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8556\/revisions"}],"predecessor-version":[{"id":9077,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8556\/revisions\/9077"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8564"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}