This was originally published on X on 14 September 2023.

About a week ago, a direct report of mine reached out, saying they were interested in learning SQL and getting some hands-on experience. Given our work type, it's a no-brainer, and we started exploring options.

Out of curiosity, I took to ChatGPT to see what it could come up with.

Turns out, the results were super impressive, and so I wanted to share it here for folks who were interested!

Here's the prompt I used:

I need you to be a computer science professor at a top-tier university.

Please outline a comprehensive 10-week lesson plan that focuses specifically on SQL, and I'd like to have a course-long project that I'm working on/building throughout the program.

The plan needs to include:

  • Relevant online texts
  • Link to a publically available dataset I can use for my work
  • Online resources as part of the lesson plan
  • Practical recommendations to test my skills

Additional Considerations:

  • Current Knowledge Level: I have minimal knowledge and experience in the subject
  • Specific Goal: Within three months, I aim to become proficient in writing basic SQL queries and be able to perform data retrieval, filtering, and sorting tasks on a simple database.
  • Preferred Learning Style: Online only.
  • Time Allocated to Leaning: I plan to spend 5-10 hours a week committed to learning.
  • Operating System: MacOS
  • Write it as a college syllabus and be as detailed as possible.

---

What ChatGPT came up with was PERFECT.

Here's the response (link will be in the following tweet so you can access the links ChatGPT provided):

Course Title: SQL Fundamentals: Understanding and Using Databases

Course Code: COMP 3210

Instructor: Prof. ChatGPT (<<<LOL)

Term: 10 weeks

Course Delivery: Online

Weekly Time Commitment: 5-10 hours

Course Description:

This course will cover SQL from the ground up. Starting with the basics of databases, we will explore how to create, read, update, and delete records in a database using SQL. We will also learn about the various data types, operators, and functions used in SQL and more advanced topics such as joins, subqueries, transactions, indexing, and stored procedures.

Course Learning Objectives:

By the end of this course, students should be able to:

  • Understand the basics of relational databases and SQL.
  • Construct and execute SQL statements to create, read, update, and delete records in a database.
  • Use SQL to filter, sort, and aggregate data.
  • Understand and use more complex SQL features like joins, subqueries, transactions, indexing, and stored procedures.
  • Complete a project demonstrating proficiency in using SQL.

Course Material:

  • Online Textbook: "SQL For Dummies" by Allen G. Taylor, Available on Amazon or Google Books.
  • Online Textbook: "Learning SQL" by Alan Beaulieu, Available on Amazon or O'Reilly Media.
  • Online Resource: SQLZoo, An interactive SQL tutorial.
  • Online Resource: W3Schools SQL Tutorial, A comprehensive SQL tutorial with examples and exercises.

Course Software:

Database: SQLite, a lightweight and simple database. Download here (compatible with MacOS).

Interface: DB Browser for SQLite. Download here (compatible with MacOS).

Dataset:

For the duration of this course, we will use the "Classic Models" database, a fictitious company dealing in scale models of classic cars. Download the database here.

Week-by-Week Plan:

Week 1: Introduction to SQL and Databases

  • Reading: "SQL For Dummies", Chapters 1-2
  • Practical Work: Install SQLite and DB Browser. Familiarize yourself with the user interface.
  • Assessment: Quiz on database fundamentals.

Week 2: Basic SQL Queries

  • Reading: "Learning SQL", Chapter 2
  • Practical Work: Write basic SQL queries using SELECT and FROM.
  • Assessment: Practical exercises on SELECT and FROM.

Week 3: Filtering and Sorting

  • Reading: "Learning SQL", Chapter 3
  • Practical Work: Write SQL queries using WHERE, AND/OR, IN, BETWEEN, LIKE, ORDER BY.
  • Assessment: Practical exercises on WHERE, AND/OR, IN, BETWEEN, LIKE, ORDER BY.

Week 4: Aggregation and Grouping

  • Reading: "Learning SQL", Chapter 4
  • Practical Work: Write SQL queries using aggregate functions (COUNT, SUM, AVG, MAX, MIN) and GROUP BY.
  • Assessment: Practical exercises on aggregate functions and GROUP BY.

Week 5: Joining Tables

  • Reading: "Learning SQL", Chapter 5
  • Practical Work: Write SQL queries using INNER JOIN, OUTER JOIN, LEFT JOIN, RIGHT JOIN.
  • Assessment: Practical exercises on joins.

Week 6: Subqueries and Derived Tables

  • Reading: "Learning SQL", Chapter 6
  • Practical Work: Write SQL queries using subqueries and derived tables.
  • Assessment: Practical exercises on subqueries and derived tables.

Week 7: Modifying Data

  • Reading: "Learning SQL", Chapter 7
  • Practical Work: Write SQL statements to INSERT, UPDATE, and DELETE records.
  • Assessment: Practical exercises on INSERT, UPDATE, DELETE.

Week 8: Advanced Topics - Part 1 (Transactions and Indexing)

  • Reading: "Learning SQL", Chapter 8
  • Practical Work: Write SQL statements to create transactions and indexes.
  • Assessment: Practical exercises on transactions and indexing.

Week 9: Advanced Topics - Part 2 (Stored Procedures)

  • Reading: "Learning SQL", Chapter 9
  • Practical Work: Write SQL statements to create and use stored procedures.
  • Assessment: Practical exercises on stored procedures.

Week 10: Course Review and Project Presentation

  • Reading: Review all chapters.
  • Practical Work: Prepare and present your final project, which should demonstrate proficiency in all areas covered by this course.
  • Assessment: Final project presentation.

Final Project:

The final project involves creating and managing a database for a hypothetical company of your choice. You'll need to create the necessary tables, fill them with data, and execute various SQL queries to demonstrate the skills you've learned throughout this course.

+++

Impressive right? There are so many opportunities to use these tools, and we're just scratching the surface.

Some final takeaways:

  • The more information you give your prompts (details, specificity, context), the better your results. Take the time to construct your prompts.
  • ChatGPT can be one of the best learning tools ever created. Sure, it can expedite work, but it also teaches you things.
  • You can interact with ChatGPT to get more hands-on! Once you get what you're looking for, get into the specifics of the results and interact with the information — ask it to quiz you, check work, give feedback, etc.

If you made it this far, thanks for reading! I'm trying to share different types of content and mediums, so I appreciate you making it to the end.

Let me know what you think below, and please do share this post with any folks you think might find this helpful info.

Care Care & Be Well,

Jack

+++

The Full Chat:

↑