SQL Errors
SQL Errors
To displav the firstname, Lastname and Total salary of all clerks from table
WORKERSand DESIG where Total Salary is calculated as salary+benefits..
SOURCE CODE:
mysql> select FIRSTNAME,LASTNAME,SALARY+BENEFITS from WORKERS,DESIG where
DESIGNATION="Clerk";
30 | P a ge
32
SCREENSHOT:
mysql> select firstname lastname, salary+benefits from workers, desig where designation = "clerk";
lastname salary+benefits
SAM 5ee00
SAM 550e0
SAM 62200
Sarah 5eeee
Sarah 55eee
Sarah 62000
Manlla
Manila 62000
George 5e000
George 55ee0
George 62000
Mary
Mary 55000
Mary 62000
Robert
Bobet
Henry
Henry 55080
Henry 62000
Ronny
Ronny 55000
Ronny 62000
Pat 58000
Pat 550e0
Pat 62808|
nax(salary) |
750e0 |
31 | Page
SCREENSHOT:
ysql> select firstname, salary from workers,desig where designation "nanager and workers.N_ID=desig.W_ID;
**************.***
firstname | salary
CAM
Manila 70808
George 75008
SCREENSHOT:
SCREENSHOT:
13.2024 |