Skip to content

Commit 1400495

Browse files
committed
Your commit message here
0 parents  commit 1400495

8 files changed

+31
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Write your MySQL query statement below
2+
SELECT p.product_name, s.year, s.price
3+
FROM Sales s LEFT JOIN Product p ON s.product_id = p.product_id;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Write your MySQL query statement below
2+
SELECT eu.unique_id AS unique_id, e.name AS name
3+
FROM Employees e LEFT JOIN EmployeeUNI eu ON e.id = eu.id;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Write your MySQL query statement below
2+
SELECT v.customer_id, COUNT(v.visit_id) AS count_no_trans
3+
FROM Visits v LEFT JOIN Transactions t
4+
ON v.visit_id = t.visit_id
5+
WHERE t.transaction_id IS NULL
6+
GROUP BY v.customer_id;

SELECT/1148. Article Views I.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Write your MySQL query statement below
2+
SELECT DISTINCT author_id as id from Views
3+
WHERE author_id = viewer_id
4+
ORDER BY id;

SELECT/1683. Invalid Tweets.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Write your MySQL query statement below
2+
SELECT tweet_id FROM Tweets WHERE length(content) > 15;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Write your MySQL query statement below
2+
SELECT product_id
3+
FROM Products
4+
WHERE low_fats = 'Y'
5+
AND recyclable = 'Y';

SELECT/584. Find Customer Referee.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Write your PostgreSQL query statement below
2+
SELECT name from Customer
3+
WHERE referee_id is null or referee_id != 2;

SELECT/595. Big Countries.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Write your MySQL query statement below
2+
SELECT name, population, area
3+
FROM World
4+
WHERE area >= 3000000
5+
OR population >= 25000000;

0 commit comments

Comments
 (0)