EM2301. Practical Class 7
EM2301. Practical Class 7
£10,08
[email protected] 9345 8
£11,17
[email protected] 6875 6
£10,54
[email protected] 6431 6
£10,00
[email protected] 6076 4
£11,38
[email protected] 8198 3
£10,23
[email protected] 7220 6
£10,82
[email protected] 8638 2
£11,37
[email protected] 8187 9
1. Extract the First and Last Name of each employee based on the email address, which is in the
following format:
[email protected]
firstname - Employee's First Name
lastname - Employee's Last Name
2. Retrieve the cities where each employee lives from the old system. In case a certain employee
isn't found in the old database, it means that he's a new hire, and therefore the default is London.
Email Hire date City
[email protected] 1/19/2019 Manchester
[email protected] 9/21/2018 Cardiff
[email protected] 11/16/2018 Birmingham
[email protected] 11/6/2017 Liverpool
[email protected] 11/6/2018 London
[email protected] 11/29/2017 Liverpool
[email protected] 12/2/2018 Bristol
[email protected] 9/11/2018 Belfast
[email protected] 12/4/2018 Cambridge
3. Retrieve the hire date of the employees. In case the hire date is missing, it means that the
employee was hired on January 5, 2020. If an employee was hired before 2019, it means he's an
experienced employee. Otherwise, return "No experience"
4. Your company had outstanding financial results in 2020, so the CEO decided to raise the
payroll of all the employees in the company, in the following rates:
Employees hired in 2020 - 3% Raise
Employees hired in 2019 - 5% Raise
Employees hired in 2018 or before - 10% Raise
Exercise 2:
Given Petrol Data in September 2019 as follows:
Code Quantity (litre)
N01MO 2700
X02BP 1800
D03CA 900
X04CA 2100
D05SH 700
X06MO 1900
N07CA 3000
D08ES 830
N09ES 500
N10BP 1000
X Petrol 2.8
D Diesel 2.5
N Oil 2
3) Fill column Producer, given that the 2 last letters of Code corresponding to producer. Unit
price is as shown below:
Unit Price
(unit: VND)
BP ES SH CA MO
West Sales
Produc
t January February
A 173 1
A 208 201
B 176 33
B 190 249
D 162 74
D 90 150
D 112 284
G 154 217
G 152 200
G 277 183
H 131 71
F 294 211
F 146 125
A 115 214
F 157 241
A 125 227
A 314 189
C 189 154
C 313 182
C 389 247
B 353 151
C 62 162
D 173 153
East Sales
Produc Januar Februar
t y y March
A 205 263 20
B 164 -17 146
C 278 177 179
D 156 214 240
D 72 134 48
D 7 256 104
A 141 87 148
A 2 -15 135
A -44 47 72
B 7 -81 2
E 25 120 171
E 197 90 124
E 221 121 48
A 84 103 134
G -13 250 51
D -5 159 70
E 136 152 28