Answer to Question #215111 in C++ for Imtiaz Arshad

Question #215111

Consider the following relations:  

 

EMP_NO EMP_NAME EMP_GRADE EMP_SAL EMP_CON DEPT_NO START_DATE 

EMP  

 

 

STD_NO STD_NAME STD_FATHER_NAME CLASS DEPT_NO 

STD  

 

 

a) Display all record of those STD whose name 3rd character is A or H or E?  

b) Write query to display employee’s name and salary after the increment of 1232?  

c) Display the employee’s name, employee No and start date of employees hired between February  1990, and December 1990. Order the query in ascending order by start date. 

d) Display the employee Name and department number of all employees who work in department 22 and 11. 

e) Display the name and salary of all employees who do not have a grade. 



1
Expert's answer
2021-07-08T15:52:27-0400
a) 
select smt.std_name
from employeemgmt.std as smt
where SUBSTRING(smt.std_name, 3 , 1) = 'e'
OR SUBSTRING(smt.std_name, 3 , 1)='h'
OR SUBSTRING(smt.std_name, 3 , 1)='a';
b) 
select e.emp_name,sum(e.EMP_salary+1231) as sal_incr
from employeemgmt.emp as e;

c) 
select e.emp_name,e.emp_no,e.emp_star,e.hired_date
from employeemgmt.emp as e
where e.emp_start_date between  FEB 1990 and Dec 1990 and e.emp_name asc;

d)

select e.emp_name, e.emp_dept
from employeemgmt.emp as e
where e.emp_dept=11 or e.emp_dept=11;

e)select e.emp_name, e.emp_sal
from employeemgmt.emp as e
where e.emp_grad=0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS