├── Basic Aggregate Functions └── Easy │ └── 620. Not Boring Movies.java ├── Basic Joins └── Easy │ └── 1378. Replace Employee ID With The Unique Identifier.java ├── README.md └── Select └── Easy ├── 1148. Article Views I.sql ├── 1683. Invalid Tweets.sql ├── 1757. Recyclable and Low Fat Products.sql ├── 584. Find Customer Referee.sql └── 595. Big Countries.sql /Basic Aggregate Functions/Easy/620. Not Boring Movies.java: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT * 3 | From Cinema 4 | WHERE mod(id,2)=1 AND description !='boring' 5 | ORDER BY rating DESC; 6 | -------------------------------------------------------------------------------- /Basic Joins/Easy/1378. Replace Employee ID With The Unique Identifier.java: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT e2.unique_id,e1.name 3 | FROM Employees e1 4 | LEFT JOIN EmployeeUNI e2 5 | ON e1.id=e2.id; 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQL-Problems -------------------------------------------------------------------------------- /Select/Easy/1148. Article Views I.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT DISTINCT author_id AS id 3 | FROM Views 4 | WHERE author_id = viewer_id 5 | ORDER BY author_id; 6 | -------------------------------------------------------------------------------- /Select/Easy/1683. Invalid Tweets.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT tweet_id 3 | FROM Tweets 4 | WHERE CHAR_LENGTH(content) >15; 5 | -------------------------------------------------------------------------------- /Select/Easy/1757. Recyclable and Low Fat Products.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | select product_id 3 | from Products 4 | where low_fats= 'Y' and recyclable ='Y'; 5 | -------------------------------------------------------------------------------- /Select/Easy/584. Find Customer Referee.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT name 3 | FROM Customer 4 | WHERE referee_id!=2 OR referee_id is null; 5 | -------------------------------------------------------------------------------- /Select/Easy/595. Big Countries.sql: -------------------------------------------------------------------------------- 1 | # Write your MySQL query statement below 2 | SELECT name, population , area 3 | FROM World 4 | WHERE area >=3000000 OR population >= 25000000; 5 | --------------------------------------------------------------------------------