heres the thing, i made a table named Employees
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| Doc | varchar(5) | NO | PRI | NULL | |
| Name | varchar(20)| NO | | NULL | |
| Salary | varchar(7) | NO | | NULL | |
| City | varchar(10)| NO | | NULL | |
| Boss | varchar(5) | YES| | NULL | |
+----------+-------------+------+-----+---------+-------+
In this table theres Doc (which is document and the primary key) of the employee, the name of the employee, the salary of the employee, the city in which the employee is at, and the boss which is the Doc.
so i put some info in and it looks like this:
+-------+----------+---------+----------+-------+
| Doc | Name | Salary | City | Boss |
+-------+----------+---------+----------+-------+
| 10305 | Joey | 700 | NYC | NULL |
| 10244 | John | 900 | Boston | 10305 |
| 35357 | Mary | 600 | Boston | 10305 |
| 90012 | Becky | 650 | Miami | 35357 |
+-------+----------+---------+----------+-------+
as you can see Joey is the boss of John and Mary, And Mary is the boss of becky.
How can i show the information of the employees who earn more money than their boss, which is John and becky?
And how do i show the boss that has 2 or more employees?
THANKS so much and is not to much to ask can you explain me...THANKSSS