Question: just need solution for 1,2,3,4 For this assignment, use the table and data from the last page. 1. Write the SQL statement to show workers




For this assignment, use the table and data from the last page. 1. Write the SQL statement to show workers with names that have the letter i before the last character. 2. Write the SQL statement to show all staff where the 2nd letter of their last names is 'e' 3. Write the SQL statement to show all staff where the 1st letter of their first names is'e' and 3rd letter 'h' 4. Write the SQL to show the staff No, position, and salary of all the female workers. 5. Write the SQL to show the staff No, position, and salary of all the male workers who make more than $20,000.00 6. Write the SQL statement to show all rows where position is either Manager or NULL. 7. Write the SQL statement to show all rows in the table ordered by i Ascending frame ii. Ascending position iii. Ascending salary 8. Show all rows in the table ordered by Notice the differences i. Descending f Name between the restuls. ii. Ascending position Descending salary MariaDB [labo2]> select * from staff; staff_no person_id | position | salary | branch_no | SG501 SG502 SG505 SG507 SG508 SG512 SG514 SG515 SG516 SG525 SG527 SG528 SG529 SG530 SG531 SG535 SG540 SG542 SG543 SG550 SG555 SG558 SG560 SG562 SG570 SG571 SG572 SG577 SG578 SG585 SG587 SG588 SG591 SG592 1576 Supervisor 320000 | B714 1411 Manager 180e2e B187 1845 | Teller 8eeee B266 1231 Assistant 30000 B731 1531 Teller 8eeee B647 1312 Teller 8eeee B553 949 Assistant 3eeee B745 808 Manager 21eeee B443 1102 Manager 180008 B190 1252 Teller 100000 B266 910 Supervisor 360000 B647 901 Manager 21eeee B424 1258 Teller 1eeeee B164 442 | Assistant 2eeee B553 1543 Assistant 3eeee B623 1975 Teller 80080 B632 859 Manager 210000 | B745 1291 Supervisor 36eeee B632 1417 Teller 1e8888 B731 913 Assistant 30000 B724 997 Supervisor 36eeee B647 616 Supervisor 360020 B960 850 Supervisor 32eeee B960 1582 Assistant 2eeee B164 421 Manager 21eeee B911 1165 Supervisor 32eeee B623 925 Assistant 2eeee B623 1435 Assistant 3eeee B942 1402 Teller 1eeeee B553 403 Assistant 3eeee B424 1159 Assistant 2eeee B942 940 | Teller | 80000 B424 943 | Assistant | 20000 B443 937 Assistant 30000 | B647 MariaDB (labo2]> select * from person; I person_id | first_name last_name | sex dob | address_id M 287 400 Bruno 403 Mariano 406 Cherryl 409 | Jennie 412 Vallie 415 Myron 418 Ben 421 | Houston 424 Codi 427 Natasha 430 Ivory 433 Reinaldo 436 | Dreama 439 Jonas 442 | Shaquana 445 Xenia 448 Lionel 451 | Erin 454 | Latricia 457 Melissa 460 Leigh 463 Nicky 466 | Enrique 469 Karina 472 Jerry 475 | Drusilla 478 Nadine Rapozo | Caffey Klumpp Hinesley Snedden Hone Haygood Dimaggio Coles Douthitt Pittenger Quintero Zucker Mangini Schissler Pasko Stone F F F M M M F F 'M M 1939-02-23 ee:00:00 1926-12-09 00:00:00 1993-12-01 00:00:00 1904-10-06 00:00:00 | 1913-05-01 00:00:00 NULL 1983-10-30 00:00:00 1951-11-17 00:00:00 1974-03-05 00:00:00 NULL 1956-09-21 00:00:00 NULL NULL NULL 1900-11-13 00:00:00 1963-02-06 00:00:00 1990-10-02 00:00:00 1925-05-12 00:00:00 1930-@7-18 00:00:00 NULL 1984-12-12 00:00:00 NULL 1985-08-20 00:00:00 1986-07-01 00:00:00 NULL 1931-01-18 00:00:00 NULL 287 NULL 251 217 NULL NULL 293 255 NULL 271 257 NULL NULL 213 111 247 167 163 NULL NULL 267 269 231 233 131 299 F M M Sam M Poblete Rhein Donis Oberle Naranjo Cantin Burchett Canale Brumback | M | F Type here to search MariaDB [labo2]> select * from branch; +-- -+ | branch_no | address_id | B424 B947 B942 B714 B901 B724 B936 B443 B164 B647 B623 B911 B632 B745 B266 B553 B960 B731 B190 B187 103 115 119 125 131 137 157 163 165 167 183 185 187 199 209 241 247 267 269 279 MariaDB (labe2]> select from state; | state_id name | abb 100 Alabama I AL 102 Alaska AK 104 Arizona AZ 106 Arkansas AR 108 California CA 110 Colorado CO 112 Connecticut 114 Delaware 116 Florida FL 118 Georgia GA 12e Hawaii HI 122 Idaho ID 124 Illinois IL 126 Indiana IN 128 Iowa IA 130 Kansas KS 132 Kentucky KY 134 Louisiana LA 136 Maine ME 138 Maryland MD 140 Massachusetts MA 142 Michigan MI 144 Minnesota | MN 146 Mississippi MS 148 Missouri MO 150 Montana MT 152 Nebraska NE 154 Nevada NV 156 | New Hampshire NH 158 New Jersey NU 160 New Mexico INM 162 New York | NY 164 North Carolina NC 166 North Dakota ND
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
