Skip to content

Commit

Permalink
Update queries.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Aafreen29 authored May 18, 2019
1 parent 4367484 commit a9ca317
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ from employee
group by department
order by employeecount desc;

-- 5> Write a query to fetch only the first name(string before space) from the FullName column of EmployeeDetails table.
-- 5> Write a query to fetch only the first name(string before space) from the FullName column of user_name table.
select distinct(substring_index(full_names, ' ', 1)) first_name from user_name;

-- 6> Write a SQL query to find all the employees from employee table who are also managers
select e1.first_name, e2.last_name from employee e1
Expand Down

0 comments on commit a9ca317

Please sign in to comment.