SQL 2nd Assignment
SQL 2nd Assignment
1. Write a query to get the Employees from the Employee table created in the previous
assignment having a salary between 13000 and 17000.
Write your query here
Select employees from employee where salary between 13000 and 17000
2. Write a query to get data of employee1, Employee7, Employee10 and Employee15
From the “Employees” table.
Write your query here
Select employees from employee where employee
in(‘Employee1,‘Employee7’,‘Employee10’,‘Employee15’);
3. Write a query to get the data of Employees whose name starts with “J” .
Write your query here
Select employees from employee where name like ‘J%’;
4. Write a query to order the employee table according to the salaries from high to low
Write your query here
Select * from employee order by salary desc;
5. Write a query to get average salary of all the employees
Write your query here
Select avg(salary) from employee;