Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query to find all the employees from Employee Table whose salary ( with Salary Column ) is between 5 0 0 0 0

Write a query to find all the employees from Employee Table whose salary (with Salary Column) is between 50000 to 100000. Write a query to fetch top N records from Employee Table. Given the following data definition, write a query that returns the number of students whose first name is John. TABLE students id INTEGER PRIMARY KEY, firstName VARCHAR(30) NOT NULL, lastName VARCHAR(30) NOT NULL Consider the following tables EMP and SALGRADE, write the query for (i) to (vi) and output for (vii) to (x) TABLE: EMPLOYEE (i) To display details of all employee in descending order of their DOJ (ii) To display NAME AND DESIG of those employees whose sgrade is either 'S02' or 'S03'(iii) To display NAME, DESIG, SGRADE of those employee who joined in the year 2009(iv) To display all SGRADE, ANNUAL_SALARY from table SALGRADE [where ANNUAL_SALARY \(=\) SALARY 12\(]\)(v) To display number of employee working in each SALGRADE from table EMPLOYEE (vi) To display NAME, DESIG, SALARY, HRA from tables EMPLOYEE and SALGRADE where SALARY is less than 50000(vii) Select MIN(DOJ), MAX(DOB) from employee; (viii) Select SGrade,Salary+HRA from SalGrade where Sgrade='S02'(ix) Select count(distinct sgrade) from employee (x) Select sum(salary), avg(salary) from salgrade

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions