You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f381eb3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+16-27Lines changed: 16 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# java-sql
1
+
# Java SQL
2
2
3
3
A student that completes this project shows that they can:
4
4
@@ -12,7 +12,7 @@ Working with SQL
12
12
13
13
## Instructions
14
14
15
-
ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same data we used during the guided project.
15
+
Reimport the Northwind database into PostgreSQL using pgAdmin. This is the same data we used during the guided project.
16
16
17
17
*[ ]***pgAdmin data refresh***
18
18
@@ -27,14 +27,13 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
27
27
28
28
* Clear query windows
29
29
30
-
### Answer the following data queries. Keep track of the SQL you write by pasting it into this document under its appropriate header below in the provided SLQ code block. You will be submitting that through the regular fork, change, pull process.
30
+
### Answer the following data queries. Keep track of the SQL you write by pasting it into this document under its appropriate header below in the provided SQL code block. You will be submitting that through the regular fork, change, pull process
31
31
32
32
*[ ]***find all customers that live in London. Returns 6 records***
33
33
34
34
<details><summary>hint</summary>
35
-
<p>
35
+
36
36
* This can be done with SELECT and WHERE clauses
37
-
</p>
38
37
</details>
39
38
40
39
```SQL
@@ -44,9 +43,8 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
44
43
*[ ]***find all customers with postal code 1010. Returns 3 customers***
45
44
46
45
<details><summary>hint</summary>
47
-
<p>
46
+
48
47
* This can be done with SELECT and WHERE clauses
49
-
</p>
50
48
</details>
51
49
52
50
```SQL
@@ -56,9 +54,8 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
56
54
*[ ]***find the phone number for the supplier with the id 11. Should be (010) 9984510***
57
55
58
56
<details><summary>hint</summary>
59
-
<p>
57
+
60
58
* This can be done with SELECT and WHERE clauses
61
-
</p>
62
59
</details>
63
60
64
61
```SQL
@@ -68,9 +65,8 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
68
65
*[ ]***list orders descending by the order date. The order with date 1998-05-06 should be at the top***
69
66
70
67
<details><summary>hint</summary>
71
-
<p>
68
+
72
69
* This can be done with SELECT, WHERE, and ORDER BY clauses
73
-
</p>
74
70
</details>
75
71
76
72
```SQL
@@ -80,10 +76,9 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
80
76
*[ ]***find all suppliers who have names longer than 20 characters. Returns 11 records***
81
77
82
78
<details><summary>hint</summary>
83
-
<p>
79
+
84
80
* This can be done with SELECT and WHERE clauses
85
81
* You can use `length(company_name)` to get the length of the name
86
-
</p>
87
82
</details>
88
83
89
84
```SQL
@@ -93,11 +88,10 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
93
88
*[ ]***find all customers that include the word 'MARKET' in the contact title. Should return 19 records***
94
89
95
90
<details><summary>hint</summary>
96
-
<p>
91
+
97
92
* This can be done with SELECT and a WHERE clause using the LIKE keyword
98
93
* Don't forget the wildcard '%' symbols at the beginning and end of your substring to denote it can appear anywhere in the string in question
99
94
* Remember to convert your contact title to all upper case for case insensitive comparing so upper(contact_title)
100
-
</p>
101
95
</details>
102
96
103
97
```SQL
@@ -113,9 +107,8 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
113
107
* the postal code is '111'
114
108
* the country is 'Middle Earth'
115
109
<details><summary>hint</summary>
116
-
<p>
110
+
117
111
* This can be done with the INSERT INTO clause
118
-
</p>
119
112
</details>
120
113
121
114
```SQL
@@ -125,9 +118,8 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
125
118
*[ ]***update _Bilbo Baggins_ record so that the postal code changes to _"11122"_***
126
119
127
120
<details><summary>hint</summary>
128
-
<p>
121
+
129
122
* This can be done with UPDATE and WHERE clauses
130
-
</p>
131
123
</details>
132
124
133
125
```SQL
@@ -137,34 +129,31 @@ ReImport the Northwind database into PostgreSQL using pgAdmin. This is the same
137
129
*[ ]***list orders grouped and ordered by customer company name showing the number of orders per customer company name. _Rattlesnake Canyon Grocery_ should have 18 orders***
138
130
139
131
<details><summary>hint</summary>
140
-
<p>
132
+
141
133
* This can be done with SELECT, COUNT, JOIN and GROUP BY clauses. Your count should focus on a field in the Orders table, not the Customer table
142
134
* There is more information about the COUNT clause on [W3 Schools](https://www.w3schools.com/sql/sql_count_avg_sum.asp)
143
-
</p>
144
135
</details>
145
136
146
137
```SQL
147
138
148
139
```
149
140
150
-
*[ ]***list customers by contact name and the number of orders per contact name. Sort the list by number of orders in descending order. _Jose Pavarotti_ should be at the top with 31 orders followed by _Roland Mendal_ with 30 orders. Last should be _Francisco Chang_ with 1 order***
141
+
*[ ]***list customers by contact name and the number of orders per contact name. Sort the list by the number of orders in descending order. _Jose Pavarotti_ should be at the top with 31 orders followed by _Roland Mendal_ with 30 orders. Last should be _Francisco Chang_ with 1 order***
151
142
152
143
<details><summary>hint</summary>
153
-
<p>
144
+
154
145
* This can be done by adding an ORDER BY clause to the previous answer and changing the group by field
155
-
</p>
156
146
</details>
157
147
158
148
```SQL
159
149
160
150
```
161
151
162
-
*[ ]***list orders grouped by customer's city showing number of orders per city. Returns 69 Records with _Aachen_ showing 6 orders and _Albuquerque_ showing 18 orders***
152
+
*[ ]***list orders grouped by customer's city showing the number of orders per city. Returns 69 Records with _Aachen_ showing 6 orders and _Albuquerque_ showing 18 orders***
163
153
164
154
<details><summary>hint</summary>
165
-
<p>
155
+
166
156
* This is very similar to the previous two queries, however, it focuses on the City rather than the Customer Names
0 commit comments