├── student_grades.db ├── sql_crash_course_one_pager.png ├── README.md └── create_student_grades_database.sql /student_grades.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adashofdata/sql-crash-course/HEAD/student_grades.db -------------------------------------------------------------------------------- /sql_crash_course_one_pager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adashofdata/sql-crash-course/HEAD/sql_crash_course_one_pager.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQL Crash Course 2 | 3 | These files accompany the 1 hour tutorial on [YouTube](https://youtu.be/2kHV2_CXJ38). 4 | 5 | It covers the content in the first chapter of my book, [SQL Pocket Guide, 4th Edition (O'Reilly)](https://amzn.to/3hGHfAV). 6 | 7 | ## Want to explore the tables on your own? 8 | 9 | [_create_student_grades_database.sql_](create_student_grades_database.sql) 10 | SQL statements to create the Students and Grades tables in [SQLite](https://www.sqlite.org/download.html) 11 | 12 | [_student_grades.db_](student_grades.db) 13 | SQL database file that can be downloaded and opened using SQLite or a database tool (like [DBeaver](https://dbeaver.io/download/)) 14 | 15 | ## Summary of the tutorial 16 | 17 | sql_crash_course_one_pager 18 | 19 | ## Access the full book online via [O'Reilly's learning platform](https://www.oreilly.com) 20 | 21 | To read the _SQL Pocket Guide, 4th Edition_ (or any other O'Reilly book) for free: 22 | 23 | * [30 Day Free Trial Promo Code](https://learning.oreilly.com/get-learning/?code=SQLPG21): SQLPG21 24 | * Your local public library / university / company may have a subscription 25 | -------------------------------------------------------------------------------- /create_student_grades_database.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE Students ( 2 | student_id int, 3 | student_name varchar(20), 4 | date_of_birth date); 5 | 6 | INSERT INTO Students (student_id, student_name, date_of_birth) 7 | VALUES (101, 'Alexis', '1/1/2001'), 8 | (102, 'Brianna', '2/2/2002'), 9 | (103, 'Chloe', '3/3/2001'), 10 | (104, 'Daniel', '4/4/2002'), 11 | (105, 'Emily', '5/5/2001'); 12 | 13 | CREATE TABLE Grades ( 14 | grade_id int, 15 | student_id int, 16 | course_name varchar(100), 17 | final_grade int); 18 | 19 | INSERT INTO Grades (grade_id, student_id, course_name, final_grade) 20 | VALUES (511, 101, 'Intro to SQL', 98), 21 | (512, 101, 'Linear Algebra', 91), 22 | (513, 101, 'Advanced Stats', 95), 23 | (514, 102, 'Intro to SQL', 82), 24 | (515, 102, 'Advanced Stats', 85), 25 | (516, 103, 'Linear Algebra', 75), 26 | (517, 103, 'Advanced Stats', 79), 27 | (518, 104, 'Intro to SQL', 99), 28 | (519, 105, 'Intro to SQL', 95), 29 | (520, 105, 'Linear Algebra', 85), 30 | (521, 105, 'Advanced Stats', 80), 31 | (522, 106, 'Intro to SQL', 86), 32 | (523, 106, 'Linear Algebra', 92), 33 | (524, 106, 'Advanced Stats', 96); --------------------------------------------------------------------------------