Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 10eb8f3

Browse filesBrowse files
committed
Update Readme.md
1 parent ae1b07b commit 10eb8f3
Copy full SHA for 10eb8f3

File tree

1 file changed

+69
-0
lines changed
Filter options

1 file changed

+69
-0
lines changed

‎Readme.md

Copy file name to clipboard
+69Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
1757 - Recyclable and Low Fat Products
2+
```sql
3+
SELECT product_id
4+
FROM Products
5+
WHERE low_fats = 'Y'
6+
AND recyclable = 'Y'
7+
```
8+
---
9+
10+
584 - Find Customer Referee
11+
```sql
12+
SELECT name
13+
FROM Customer
14+
WHERE referee_id != 2 OR referee_id IS null
15+
```
16+
17+
595 - Big Countries
18+
```sql
19+
SELECT name, population, area
20+
FROM WORLD
21+
WHERE area >= 3000000
22+
OR population >= 25000000
23+
```
24+
25+
1148 - Article Views I
26+
```sql
27+
SELECT DISTINCT author_id as id
28+
FROM Views
29+
WHERE viewer_id >= 1
30+
AND author_id = viewer_id
31+
ORDER BY author_id
32+
```
33+
34+
1683 - Invalid Tweets
35+
```sql
36+
SELECT tweet_id
37+
FROM Tweets
38+
WHERE length(content) > 15
39+
```
40+
41+
1378 - Replace Employee ID With The Unique
42+
Identifier
43+
```sql
44+
SELECT unique_id, name
45+
FROM Employees e
46+
LEFT JOIN EmployeeUNI eu
47+
ON e.id = eu.id
48+
```
49+
50+
1068 - Product Sales Analysis I
51+
```sql
52+
SELECT product_name, year, price
53+
FROM Sales s
54+
LEFT JOIN Product p
55+
ON s.product_id = p.product_id
56+
```
57+
58+
1581 - Customer Who Visited but Did Not Make Any Transactions
59+
```sql
60+
SELECT customer_id, COUNT(*) as count_no_trans
61+
FROM Visits
62+
WHERE visit_id NOT IN (SELECT DISTINCT visit_id FROM Transactions)
63+
GROUP BY customer_id
64+
```
65+
66+
67+
68+
69+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.