From: Greg Wilson Date: Wed, 4 Dec 2013 15:08:16 +0000 (-0500) Subject: Adding diagrams to novice SQL lessons X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=81f0bb9a24e5f775256387b90b95cf2761ec18b8;p=swc-sql.git Adding diagrams to novice SQL lessons --- diff --git a/sql/novice/02-sort-dup.ipynb b/sql/novice/02-sort-dup.ipynb index 2f885c9..f09cdd0 100644 --- a/sql/novice/02-sort-dup.ipynb +++ b/sql/novice/02-sort-dup.ipynb @@ -383,7 +383,7 @@ "source": [ "### Challenges\n", "\n", - "FIXME: write challenges for sorting and removing duplicates" + "1. Write a query that displays scientists' full names, but orders them by surname." ] } ], diff --git a/sql/novice/03-filter.ipynb b/sql/novice/03-filter.ipynb index 1c7fa54..0182954 100644 --- a/sql/novice/03-filter.ipynb +++ b/sql/novice/03-filter.ipynb @@ -61,7 +61,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -79,13 +79,6 @@ "to determine what columns to display." ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "FIXME: diagram showing SQL processing pipeline executing a join that multiplies then filters records" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -116,12 +109,19 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], "prompt_number": 3 }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"SQL" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -150,7 +150,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -219,7 +219,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -261,7 +261,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -302,7 +302,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -341,7 +341,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], diff --git a/sql/novice/06-agg.ipynb b/sql/novice/06-agg.ipynb index 0f08a18..635a7f6 100644 --- a/sql/novice/06-agg.ipynb +++ b/sql/novice/06-agg.ipynb @@ -60,7 +60,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -102,6 +102,13 @@ ], "prompt_number": 3 }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"SQL" + ] + }, { "cell_type": "code", "collapsed": false, @@ -121,7 +128,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -157,7 +164,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -182,7 +189,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -207,7 +214,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -249,7 +256,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -282,7 +289,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -324,7 +331,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -369,7 +376,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -401,7 +408,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -439,7 +446,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -477,7 +484,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -521,7 +528,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -540,13 +547,6 @@ "alongside the aggregated `reading` values." ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "FIXME: diagram showing SQL processing pipeline with an extra stage for aggregation, and multiple records being compressed into one" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -589,7 +589,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], @@ -637,7 +637,7 @@ "metadata": {}, "output_type": "display_data", "text": [ - "" + "" ] } ], diff --git a/sql/novice/img/sql-aggregation.odg b/sql/novice/img/sql-aggregation.odg new file mode 100644 index 0000000..ed2b9a0 Binary files /dev/null and b/sql/novice/img/sql-aggregation.odg differ diff --git a/sql/novice/img/sql-aggregation.svg b/sql/novice/img/sql-aggregation.svg new file mode 100644 index 0000000..b090bc6 --- /dev/null +++ b/sql/novice/img/sql-aggregation.svg @@ -0,0 +1,415 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 619 + + + + + DR-1 + + + + + 1927-02-08 + + + + + 622 + + + + + DR-1 + + + + + 1927-02-10 + + + + + 734 + + + + + DR-3 + + + + + 1939-01-07 + + + + + 735 + + + + + DR-3 + + + + + 1939-01-12 + + + + + 751 + + + + + DR-3 + + + + + 1939-02-26 + + + + + 752 + + + + + DR-3 + + + + + 837 + + + + + MSK-4 + + + + + 1932-01-14 + + + + + 844 + + + + + DR-1 + + + + + 1932-03-22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1. select date + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2. min + + + + + 1927-02-08 + + + + + 1927-02-10 + + + + + 1939-01-07 + + + + + 1939-01-12 + + + + + 1939-02-26 + + + + + 1932-01-14 + + + + + 1932-03-22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1927-02-08 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sql/novice/img/sql-filter.odg b/sql/novice/img/sql-filter.odg new file mode 100644 index 0000000..9bf6023 Binary files /dev/null and b/sql/novice/img/sql-filter.odg differ diff --git a/sql/novice/img/sql-filter.svg b/sql/novice/img/sql-filter.svg new file mode 100644 index 0000000..3d79561 --- /dev/null +++ b/sql/novice/img/sql-filter.svg @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 619 + + + + + DR-1 + + + + + 1927-02-08 + + + + + 622 + + + + + DR-1 + + + + + 1927-02-10 + + + + + 734 + + + + + DR-3 + + + + + 1939-01-07 + + + + + 735 + + + + + DR-3 + + + + + 1939-01-12 + + + + + 751 + + + + + DR-3 + + + + + 1939-02-26 + + + + + 752 + + + + + DR-3 + + + + + 837 + + + + + MSK-4 + + + + + 1932-01-14 + + + + + 844 + + + + + DR-1 + + + + + 1932-03-22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1. where site = 'DR-1' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 619 + + + + + DR-1 + + + + + 1927-02-08 + + + + + 622 + + + + + DR-1 + + + + + 1927-02-10 + + + + + 844 + + + + + DR-1 + + + + + 1932-03-22 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 619 + + + + + 622 + + + + + 844 + + + + + + + + + + + + + + + + + + + + + + + + + 619 + + + + + 622 + + + + + 844 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2. select ident + + + + + + + \ No newline at end of file