Skip to content

Commit 3915fec

Browse files
committed
init
0 parents  commit 3915fec

File tree

3 files changed

+300
-0
lines changed

3 files changed

+300
-0
lines changed

ex_1.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Question
2+
3+
4+
## ex_01
5+
6+
寫出可以得到下方結果的 SQL 語句
7+
8+
Answer
9+
```sql
10+
/* SOME SQL STATEMENT */
11+
```
12+
13+
Output
14+
```
15+
+-----------+-----------+-----------+
16+
| lastname | firstname | jobtitle |
17+
+-----------+-----------+-----------+
18+
| Jennings | Leslie | Sales Rep |
19+
| Thompson | Leslie | Sales Rep |
20+
| Firrelli | Julie | Sales Rep |
21+
| Patterson | Steve | Sales Rep |
22+
| Tseng | Foon Yue | Sales Rep |
23+
| Vanauf | George | Sales Rep |
24+
| Bondur | Loui | Sales Rep |
25+
| Hernandez | Gerard | Sales Rep |
26+
| Castillo | Pamela | Sales Rep |
27+
| Bott | Larry | Sales Rep |
28+
| Jones | Barry | Sales Rep |
29+
| Fixter | Andy | Sales Rep |
30+
| Marsh | Peter | Sales Rep |
31+
| King | Tom | Sales Rep |
32+
| Nishi | Mami | Sales Rep |
33+
| Kato | Yoshimi | Sales Rep |
34+
| Gerard | Martin | Sales Rep |
35+
+-----------+-----------+-----------+
36+
17 rows in set (0.00 sec)
37+
```

ex_2.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Exercise 2
2+
3+
## ex_1
4+
5+
寫出可以得到下方結果的 SQL 語句
6+
7+
Answer
8+
9+
```sql
10+
/* SOME SQL STATEMENT */
11+
```
12+
13+
Output
14+
15+
```
16+
+-----------+--------+--------------+-----------+
17+
| member_id | member | committee_id | committee |
18+
+-----------+--------+--------------+-----------+
19+
| 1 | John | 1 | John |
20+
| 3 | Mary | 2 | Mary |
21+
| 5 | Amelia | 3 | Amelia |
22+
+-----------+--------+--------------+-----------+
23+
3 rows in set (0.00 sec)
24+
```
25+
26+
## ex_2
27+
28+
寫出可以得到下方結果的 SQL 語句
29+
30+
Answer
31+
32+
```sql
33+
/* SOME SQL STATEMENT */
34+
```
35+
36+
Output
37+
38+
```
39+
+-----------+--------+--------------+-----------+
40+
| member_id | member | committee_id | committee |
41+
+-----------+--------+--------------+-----------+
42+
| 1 | John | 1 | John |
43+
| 2 | Jane | NULL | NULL |
44+
| 3 | Mary | 2 | Mary |
45+
| 4 | David | NULL | NULL |
46+
| 5 | Amelia | 3 | Amelia |
47+
+-----------+--------+--------------+-----------+
48+
5 rows in set (0.00 sec)
49+
```
50+
51+
## ex_3
52+
53+
寫出可以得到下方結果的 SQL 語句
54+
55+
Answer
56+
57+
```sql
58+
/* SOME SQL STATEMENT */
59+
```
60+
61+
Output
62+
63+
```
64+
+-----------+--------+--------------+-----------+
65+
| member_id | member | committee_id | committee |
66+
+-----------+--------+--------------+-----------+
67+
| 2 | Jane | NULL | NULL |
68+
| 4 | David | NULL | NULL |
69+
+-----------+--------+--------------+-----------+
70+
2 rows in set (0.00 sec)
71+
```
72+
73+
## ex_4
74+
75+
寫出可以得到下方結果的 SQL 語句
76+
77+
Answer
78+
79+
```sql
80+
/* SOME SQL STATEMENT */
81+
```
82+
83+
Output
84+
85+
```
86+
+-----------+--------+--------------+-----------+
87+
| member_id | member | committee_id | committee |
88+
+-----------+--------+--------------+-----------+
89+
| 1 | John | 1 | John |
90+
| 3 | Mary | 2 | Mary |
91+
| 5 | Amelia | 3 | Amelia |
92+
| NULL | NULL | 4 | Joe |
93+
+-----------+--------+--------------+-----------+
94+
4 rows in set (0.00 sec)
95+
```
96+
97+
## ex_5
98+
99+
寫出可以得到下方結果的 SQL 語句
100+
101+
Answer
102+
103+
```sql
104+
/* SOME SQL STATEMENT */
105+
```
106+
107+
Output
108+
109+
```
110+
+-----------+--------+--------------+-----------+
111+
| member_id | member | committee_id | committee |
112+
+-----------+--------+--------------+-----------+
113+
| NULL | NULL | 4 | Joe |
114+
+-----------+--------+--------------+-----------+
115+
1 row in set (0.00 sec)
116+
```

0 commit comments

Comments
 (0)