diff --git a/README.md b/README.md index 05f5193..0d82b95 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ ### SQL Solutions +1. [175. Combine Two Tables](./SQL-Practice-Question-Solutions/175-combine-two-tables.sql) - [Leetcode Link](https://leetcode.com/problems/combine-two-tables) ![Easy](https://img.shields.io/badge/-Easy-brightgreen) +1. [181. Employees Earning More Than Their Managers](./SQL-Practice-Question-Solutions/181-employees-earning-more-than-their-managers.sql) - [Leetcode Link](https://leetcode.com/problems/employees-earning-more-than-their-managers/description/) ![Easy](https://img.shields.io/badge/-Easy-brightgreen) 1. [183. Customers Who Never Order](./SQL-Practice-Question-Solutions/183-customers-who-never-order.sql) - [Leetcode Link](https://leetcode.com/problems/customers-who-never-order/description/) ![Easy](https://img.shields.io/badge/-Easy-brightgreen) 2. [595. Big Countries](./SQL-Practice-Question-Solutions/595-big-countries.sql) - [Leetcode Link](https://leetcode.com/problems/big-countries) ![Easy](https://img.shields.io/badge/-Easy-brightgreen) 3. [620. Not boring movies](./SQL-Practice-Question-Solutions/620-not-boring-movies.sql) - [Leetcode Link](https://leetcode.com/problems/not-boring-movies) ![Easy](https://img.shields.io/badge/-Easy-brightgreen) diff --git a/SQL-Practice-Question-Solutions/175-combine-two-tables.sql b/SQL-Practice-Question-Solutions/175-combine-two-tables.sql new file mode 100644 index 0000000..8fd0a48 --- /dev/null +++ b/SQL-Practice-Question-Solutions/175-combine-two-tables.sql @@ -0,0 +1,4 @@ +select p.firstName, p.lastName, a.city, a.state +from person as p +left join address as a +on p.personId = a.personId; \ No newline at end of file diff --git a/SQL-Practice-Question-Solutions/181-employees-earning-more-than-their-managers.sql b/SQL-Practice-Question-Solutions/181-employees-earning-more-than-their-managers.sql new file mode 100644 index 0000000..baa9050 --- /dev/null +++ b/SQL-Practice-Question-Solutions/181-employees-earning-more-than-their-managers.sql @@ -0,0 +1,5 @@ +select e.name as Employee +from Employee e +join Employee m +on e.managerId = m.id +where e.salary > m.salary;