Today is the day that tests your knowledge skills. Answer the following questions in the comment section. I will update one by one after your responses.

Write a sql statement to create a database called company and then create the following table.
Salesman Table

s_id FirstName LastName City commission
---- --------- ---------- ---------- ----------
5001 Thilak Perera Kandy 0.15
5002 Jagath Goonapala Colombo 0.13
5005 Sarath Perera Kandy 0.11
5006 Sandun Peris Jaffna 0.14
5003 Pasan Moragaha Galle 0.12
5007 Nadun Weerasiri Colombo 0.13

2. Write a sql statement to display all the information of all salesmen. 3. Write a sql statement to display first name and commission for all the salesmen.

4. Write a sql statement to display full name (first name and last name) and commission for all the salesmen. The retrieved data should be ordered based on commission rate in ascending order.

5. Write a sql statement to display city of salesmen whose last name is Perera. (Discuss about the difference in retrieved content in relational algebra and in SQL).

6. Write a sql statement to display first name of salesmen whose first name has “sa”. (Discuss what happens if you are only going to retrieve first names starting with “sa”)

7. Write a sql statement to display first name of salesmen from Kandy or getting a commission of

8. Write a sql statement to get the count of salesman who are getting a commission above 0.13.

9. Write a sql statement to display total earning of each salesman if the total value of sales made by each salesman is Rs.1000. (Note: total earning = commission * total value).