select emp_id from employee_data where age > 30;
+--------+
| emp_id |
+--------+
| 2 |
| 3 |
| 6 |
| 7 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 |
| 16 |
| 20 |
| 21 |
+--------+
14 rows in set (0.00 sec)
select f_name, l_name from employee_data where title='web designer';
+---------+--------+
| f_name | l_name |
+---------+--------+
| Anamika | Pandit |
| Mary | Anchor |
+---------+--------+
2 rows in set (0.00 sec)
- This displays all the information on employees who draw less than or equal to $100000 as salary.
SELECT * from employee_data where salary <=100000;
+--------+---------+------------+--------------------------+------+------+--------+-------+--------------------+
| emp_id | f_name | l_name | title | age | yos | salary | perks | email |
+--------+---------+------------+--------------------------+------+------+--------+-------+--------------------+
| 4 | Anamika | Pandit | Web Designer | 27 | 3 | 90000 | 15000 | ana@bignet.com |
| 5 | Mary | Anchor | Web Designer | 26 | 2 | 85000 | 15000 | mary@bignet.com |
| 6 | Fred | Kruger | Programmer | 31 | 3 | 75000 | 15000 | fk@bignet.com |
| 7 | John | MacFarland | Programmer | 34 | 4 | 80000 | 16000 | john@bignet.com |
| 8 | Edward | Sakamuro | Programmer | 25 | 2 | 75000 | 14000 | eddie@bignet.com |
| 9 | Alok | Nanda | Programmer | 32 | 3 | 70000 | 10000 | alok@bignet.com |
| 10 | Hassan | Rajabi | Multimedia Programmer | 33 | 3 | 90000 | 15000 | hasan@bignet.com |
| 11 | Paul | Simon | Multimedia Programmer | 43 | 2 | 85000 | 12000 | ps@bignet.com |
| 12 | Arthur | Hoopla | Multimedia Programmer | 32 | 1 | 75000 | 15000 | arthur@bignet.com |
| 14 | Roger | Lewis | System Administrator | 35 | 2 | 100000 | 13000 | roger@bignet.com |
| 15 | Danny | Gibson | System Administrator | 34 | 1 | 90000 | 12000 | danny@bignet.com |
| 17 | Monica | Sehgal | Marketing Executive | 30 | 3 | 90000 | 25000 | monica@bignet.com |
| 18 | Hal | Simlai | Marketing Executive | 27 | 2 | 70000 | 18000 | hal@bignet.com |
| 19 | Joseph | Irvine | Marketing Executive | 27 | 2 | 72000 | 18000 | joseph@bignet.com |
| 20 | Shahida | Ali | Customer Service Manager | 32 | 3 | 70000 | 9000 | shahida@bignet.com |
+--------+---------+------------+--------------------------+------+------+--------+-------+--------------------+
15 rows in set (0.00 sec)
select salary, perks from employee_data where perks >= 16000;
+--------+-------+
| salary | perks |
+--------+-------+
| 200000 | 50000 |
| 120000 | 25000 |
| 110000 | 20000 |
| 80000 | 16000 |
| 110000 | 20000 |
| 120000 | 28000 |
| 90000 | 25000 |
| 70000 | 18000 |
| 72000 | 18000 |
| 120000 | 25000 |
+--------+-------+
10 rows in set (0.01 sec)
select l_name, f_name from employee_data where title = 'Marketing Executive';
+--------+--------+
| l_name | f_name |
+--------+--------+
| Sehgal | Monica |
| Simlai | Hal |
| Irvine | Joseph |
+--------+--------+
3 rows in set (0.00 sec)