Here’s how to calculate average sales per day in MySQL if you have sales data for your business in a database.

# sales

## Calculate decile from recency in MySQL

Calculate decile from recency in MySQL. E.g, to rank customers based on recency of purchases or orders

## Calculate decile in MySQL based on totals

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.

## 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 from frequency in MySQL

Calculate percentile from frequency or counts in MySQL. E.g, to rank customers based on number of purchases or orders instead of total sales

## Calculate percentile from recency in MySQL

Calculate percentile from recency in MySQL. E.g, to rank customers based on recency of purchases or orders