Notes
Untitled
Content of the notes (1)
Page 1
SQL BASE QUESTION
-Write an SQL query to fetch the names of workers who earn the highest salary?
Ans;-SELECT FIRST_NAME, SALARY from Worker WHERE SALARY=(SELECT max(SALARY) from Worker);
-- Write an SQL query to fetch three min salaries from a table?
Ans;-SELECT distinct Salary from worker a WHERE 3 >= (SELECT count(distinct Salary) from worker b WHERE a.Salary >= b.Salary) order by a.Salary desc;
Information
- Description
- Note on Untitled, created by black dragon on 03/10/2020.
- Created by
- black dragon
- Views
- 0
- Rating