Web17 jan. 2024 · SELECT YEAR (DateofBirth) as Year, Count (1) AS NumberOfEmployees FROM Employee WHERE DateofBirth < '2000-01-01' GROUP BY YEAR (DateofBirth) … WebList the emps in the asc order of Designations of those joined after the second half of 1981. A) select * from emp where ... select * from emp where hiredate between ’01-jan-81’ and ’31-dec-81’; List the emps who are joined in the month of Aug ... List the employees who joined in 1981 with the job same as the most senior person of the ...
SQL Queries PDF Employment Compensation Salary - Scribd
Web23 okt. 2024 · In order to get result you want, you need a calendar - separate table which contains all months in a year because table with employees doesn't contain all months (see above - nobody was hired in e.g. March). Then you'd outer join that calendar with the original table, count number of employees and - that's it: Web27 nov. 2016 · SQL INTERWIEW QUESTIONS ON SUBQUERIES. 1. List the department names that are having no employees at all. 2. Display all the employees whose job is same as scott. 3. Display scott manager’s manager’s department name. 4. List employees whose job is same as scott and their salary greater than smith’s salary. gebr. westhoff gmbh co. kg bremen
sql server - SQL Query employees who joined in x year y month …
Web10 sep. 2011 · 1 Answer Sorted by: 7 The WHERE part goes after the FROM part. select ename, job, hiredate from emp where hiredate between '20-FEB-81' AND '01-MAY-81' Note that your date literals may not always work if the NLS settings change. It is highly recommended to use to_date () instead. Weblist the employees who joined after 2 years of first employee of the company and more than blake salary 31.display location of all the employees who reporting to blake select loc from dept where deptno in (select deptno from emp where mgr in (select empno from emp where ename=’blake’)); 32.list all the employees whose job is same as jones and their … Web19 aug. 2024 · SQL employee Database: Exercise-81 with Solution [ An editor is available at the bottom of the page to write and execute the scripts.] 81. From the following table, … gebrunchte prothese