MySQL query to find number of employees under manager

In this tutorial I am going to show you how to find the number of employees under manager. Generally employees and managers both are employees of an organization. But according to the experience level seniority some employees in the organization become manager, lead, etc. Therefore the junior employees are going to report the senior employees. This example will show you…

MySQL query to find out all employees even when an employee is not tagged to any department

This tutorial will show how to list all employees even when an employee is not tagged to any department.

MySQL query to find managers who are having minimum number of employees under them

This tutorial will show how to find the managers who are having specified minimum number of employees working under them.

Select only one random item from each category in MySQL

This tutorial shows how to select items randomly from each category in MySQL. So here I will select exactly one item randomly from each category. People who need sometimes to select photo from each photo category and display them on the page for animation purpose will be benefited. In this example I have used two sample tables with data. You…