FreshFromATL
Self Made
sql gawds I need some serious help, daps and rep will be provided;
mysql> desc staff;
+---------------+--------------+------+-----+---------+-------
| Field | Type | Null | Key | Default | Extra
+---------------+--------------+------+-----+---------+-------
| Staff_no | varchar(6) | NO | PRI | NULL |
| Lastname | varchar(30) | YES | | NULL |
| Firstname | varchar(25) | YES | | NULL |
| Hire_date | date | YES | | NULL |
| Location | varchar(30) | YES | | NULL |
| Supervisor_no | varchar(6) | YES | | NULL |
| Salary | decimal(8,2) | YES | | NULL |
| Commission | decimal(4,2) | YES | | NULL |
+---------------+--------------+------+-----+---------+-------
8 rows in set (0.00 sec)
mysql> desc sales;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| Order_no | varchar(6) | NO | PRI | NULL | |
| Sale_date | date | YES | | NULL | |
| Staff_no | varchar(6) | YES | | NULL | |
| Cust_no | varchar(6) | YES | | NULL | |
| Invoiced | decimal(2,0) | YES | | NULL | |
+-----------+--------------+------+-----+---------+-------+
Using the tables STAFF and SALES find all order numbers and sales date by staff member 000008. Include staff number, name and commission.
Can anybody help ive been getting error messages for an hour and a half trying to get this right
This shouldn't take more than 5 seconds to do. Hint: You need an inner join. You will be joining the tables on staff number.