Skip to content

Commit b126ed3

Browse files
authored
Add callout, fix numbered list, add to authors. (#350)
Formatting fixes: Add a proper callout box for information on multiple statements. Reorder instruction list so last statement appears with others, and so the numbering doesn't reset. Add myself to authors (from prior work).
1 parent e224ad9 commit b126ed3

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Hilmar Lapp <[email protected]>
2323
Ian Carroll <[email protected]>
2424
Jaime Ashander <[email protected]>
2525
James Allen <[email protected]>
26+
James Foster <[email protected]>
2627
Jethro Johnson <[email protected]>
2728
2829
Jon Pipitone <[email protected]>

_episodes/00-sql-introduction.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ follow these instructions:
187187
7. Press **OK**, you should subsequently get a message that the table was imported.
188188
9. Back on the Database Structure tab, you should now see the table listed. Right click on the table name and choose **Modify Table**, or click on the **Modify Table** button just under the tabs and above the table list.
189189
10. Click **Save** if asked to save all pending changes.
190-
11. In the center panel of the window that appears, set the data types for each field using the suggestions in the table below (this includes fields from the `plots` and `species` tables also):
190+
11. In the center panel of the window that appears, set the data types for each field using the suggestions in the table below (this includes fields from the `plots` and `species` tables also).
191+
12. Finally, click **OK** one more time to confirm the operation. Then click the **Write Changes** button to save the database.
191192

192193
| Field | Data Type | Motivation | Table(s) |
193194
|-------------------|:---------------|----------------------------------------------------------------------------------|-------------------|
@@ -205,8 +206,6 @@ follow these instructions:
205206
| weight | REAL | Field contains measured numerical data | surveys |
206207
| year | INTEGER | Allows for meaningful arithmetic and comparisons | surveys |
207208

208-
12. Finally, click **OK** one more time to confirm the operation. Then click the **Write Changes** button to save the database.
209-
210209

211210
> ## Challenge
212211
>

_episodes/01-sql-basic-queries.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ Sometimes you don't want to see all the results, you just want to get a sense of
4646

4747
SELECT *
4848
FROM surveys
49-
LIMIT 10;
49+
LIMIT 10;
5050

5151
### Unique values
5252

5353
If we want only the unique values so that we can quickly see what species have
54-
been sampled we use `DISTINCT`
54+
been sampled we use `DISTINCT`
5555

5656
SELECT DISTINCT species_id
5757
FROM surveys;
@@ -112,7 +112,7 @@ Here, we only want the data since 2000:
112112
WHERE year >= 2000;
113113
114114
If we used the `TEXT` data type for the year, the `WHERE` clause should
115-
be `year >= '2000'`.
115+
be `year >= '2000'`.
116116
117117
We can use more sophisticated conditions by combining tests
118118
with `AND` and `OR`. For example, suppose we want the data on *Dipodomys merriami*
@@ -135,9 +135,9 @@ species codes `DM`, `DO`, and `DS`, we could combine the tests using OR:
135135
136136
> ## Challenge
137137
>
138-
> - Produce a table listing the data for all individuals in Plot 1
138+
> - Produce a table listing the data for all individuals in Plot 1
139139
> that weighed more than 75 grams, telling us the date, species id code, and weight
140-
> (in kg).
140+
> (in kg).
141141
>
142142
> > ## Solution
143143
> > ~~~
@@ -250,10 +250,13 @@ The computer is basically doing this:
250250
3. Displaying requested columns or expressions.
251251
252252
Clauses are written in a fixed order: `SELECT`, `FROM`, `WHERE`, then `ORDER
253-
BY`.
253+
BY`.
254254
255+
> ## Multiple statements
256+
>
255257
> It is possible to write a query as a single line, but for readability, we recommend to put each clause on its own line.
256-
> The standard way to separate each SQL statement is with a semicolon. This allows more than one SQL statement to be executed together.
258+
> The standard way to separate a whole SQL statement is with a semicolon. This allows more than one SQL statement to be executed together.
259+
{: .discussion}
257260
258261
> ## Challenge
259262
>

0 commit comments

Comments
 (0)