You can calculate decile in MySQL to identify best customers. You can come up with more focused, relevant retention initiatives. Here’s a query to do it.
tips
Calculate decile from frequency in MySQL
Calculate decile from frequency or counts in MySQL. E.g, to rank customers based on number of purchases or orders instead of total sales
Calculate percentile in MySQL based on totals
It can be a pain to calculate percentile in MySQL. There are no functions for it yet. Here’s a ready made query to do it.
Calculate percentile from recency in MySQL
Calculate percentile from recency in MySQL. E.g, to rank customers based on recency of purchases or orders
How to find difference between two dates in MySQL
Calculating difference between two dates in MySQL is really easy. Here’s how you can do it. Let’s say dt1 and dt2 are 2 columns in table table_name.
Enable remote access to MySQL database
Usually remote access to MySQL database is disabled for security reasons. However, if you need to provide remote access to MySQL, just follow these steps.
How to create a read-only MySQL user?
Sometimes you need to create a read-only MySQL user. You can follow these steps and use these ready made commands to create a read-only MySQL user.