Ubiq Blog

Build business dashboards & reports in minutes with Ubiq

  • What’s Ubiq
  • Features
  • Pricing
  • Try Ubiq now!

MySQL

How to calculate rank in MySQL

MySQL, MySQL Tips, MySQL Tutorials

Many a time you need to calculate rank in MySQL. You can order by a number but can’t calculate rank in MySQL easily. Here’s a query you can use.

Continue reading


How to find nth rank in MySQL?

MySQL, MySQL Tips, MySQL Tutorials

Many a time you need to fin nth rank in MySQL. To find nth rank in MySQL, we will calculate rank in MySQL. Then we filter the nth rank in MySQL.

Continue reading


Calculate decile from recency in MySQL

MySQL, MySQL Tips, MySQL Tutorials

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

Continue reading


Calculate decile in MySQL based on totals

MySQL, MySQL Tips, MySQL Tutorials

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.

Continue reading


Calculate decile from frequency in MySQL

MySQL, MySQL Tips, MySQL Tutorials

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

Continue reading


Calculate percentile from recency in MySQL

MySQL, MySQL Tips, MySQL Tutorials

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

Continue reading


Calculate percentile in MySQL based on totals

MySQL, MySQL Tips, MySQL Tutorials

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.

Continue reading


Calculate percentile from frequency in MySQL

MySQL, MySQL Tips, MySQL Tutorials

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

Continue reading


Get current year, current month and current day in MySQL

MySQL, MySQL Tips, MySQL Tutorials

Here are a few commonly used commands to find current year, current month and current day in MySQL. You can use date format is different variations for it.

Continue reading


How to calculate age from date of birth in SQL

MySQL, MySQL Tips, MySQL Tutorials

Here’s how to calculate age from date of birth in SQL you can use the following MySQL query. This is useful to find out recency of activity.

Continue reading


Posts navigation

Older posts

About Us



Ubiq is a business intelligence & reporting tool for MySQL, PostgreSQL & SQL Server. Build business dashboards & reports in minutes.Try it Today!




  • Popular
  • Recent
  • how to choose the right visualization
    How to Choose the Right Visualization for your data Jun 30, 2015
  • how to design business dashboards
    How to design Business Dashboards that Speak to your audience Jun 16, 2015
  • Calculate decile in MySQL based on totals Dec 3, 2013
  • How to find difference between two dates in MySQL Nov 29, 2013
  • dashboard design best practices
    Dashboard design Best Practices: Getting insights at a glance Dec 1, 2014
  • how to choose the right visualization
    How to Choose the Right Visualization for your data Jun 30, 2015
  • how to design business dashboards
    How to design Business Dashboards that Speak to your audience Jun 16, 2015
  • dashboard design best practices
    Dashboard design Best Practices: Getting insights at a glance Dec 1, 2014
  • 4 Key Ecommerce Metrics to grow faster Feb 3, 2014
  • 9 Financial metrics you must track for growing your Ecommerce business Jan 21, 2014
dazzling Theme by Colorlib Powered by WordPress