CBSE BOARD XII, asked by Nikhil0204, 1 month ago

ANSWER THE FOLLOWING QUESTION:

PLS DON'T SPAM​

Attachments:

Answers

Answered by Equestriadash
7

(a)

(i) To display employee name and salary of those employees who don't have their salary in the range of 25000 to 40000.

  • Select EName, Sal from Emp where salary not between 25000 and 40000;

(ii) To display EmpNo and EName of all employees from table Emp.

  • Select EmpNo, EName from Emp;

(iii) To display name, job, salary and hirdate of employees hired between May 20, 1991 and December 31, 2001; order the query in ascending order of  hiredate.

  • Select EName, Job, Sal, Hiredate from Emp where Hiredate between '1991-05-20' and '2001-12-31' order by Hiredate;

(iv) To display EName joined with Job with heading 'Employee', Sal*12 as 'Total salary' from table Emp;

  • Select conca‎t(EName, Job) as 'Employee', Sal*12 as 'Total salary' from Emp;

(v) To display name, job, salary, and hiredate of employees who are hired between February 20, 1991 and May 1, 1991; order the query in ascending order of hiredate.

  • Select EName, Job, Sal, Hiredate from Emp where Hiredate between '1991-02-20' and '1991-05-01' order by Hiredate;

(b)

(i) \tt Select\ EN ame,\ 12*Sal\ +\ Comm\ from\ Emp\ where\ EN ame\ =\ 'Ashok Singhal';

\begin{array}{|c|c|}\cline{1-2}\bf ENa me & \bf 12*Sal\ +\ Comm\\\cline{1-2}\sf Ashok\ Singhal & \sf 164500\\\cline{1-2}\end{array}

(ii) \tt Select\ EN ame\ from\ Emp\ where\ EN ame\ like\ '\_a\%';

\begin{array}{|c|}\cline{1-1}\bf EN ame\\\cline{1-1}\sf Martin\ S.\\\cline{1-2}\sf Kavita\ Sharma\\\cline{1-1}\sf Jagdeep\ Rana\\\cline{1-1}\sf Manoj\ Kaushik\\\cline{1-1}\end{array}

(iii) \tt Select\ EN ame\ from\ Emp\ where\ MGR\ is\ Null;

\begin{array}{|c|}\cline{1-1}\bf EN ame\\\cline{1-1}\sf Kavita\ Sharma\\\cline{1-1}\end{array}

(iv) \tt Select\ count(*)\ from\ Emp\ where\ DeptNo\ =\ 20;

\begin{array}{|c|}\cline{1-1}\bf count(*)\\\cline{1-1}\sf 5\\\cline{1-1}\end{array}

(v) \tt Select\ count(Comm)\ from\ Emp\ where\ DeptNo\ =\ 20;

\begin{array}{|c|}\cline{1-1}\bf count(Comm)\\\cline{1-1}\sf 1\\\cline{1-1} \end{array}


Equestriadash: Thanks for the Brainliest! ^_^"
Similar questions