Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.23 KB

File metadata and controls

32 lines (20 loc) · 1.23 KB

Pre-class Study: Advanced SQL Navigation

Welcome! Before our session, we need to ensure your "cockpit" is ready for flight. We will be using DuckDB, a high-performance database, and DbGate as our control center.

1. Environment Setup

  • Database File: Ensure you have the unit-1-5.db file downloaded to a known folder on your computer.

2. Key Concepts to Recall

Think of a database like a library.

  • Metadata is the card catalog (information about the books).
  • Tables are the shelves.
  • Joins are the connections we make when a book in the "Authors" section refers to a book in the "Geography" section.

3. The "Why" of Advanced SQL

In basic SQL, we ask simple questions: "Show me all clients."
In advanced SQL, we ask analytical questions: "Show me the top 10% of clients based on their insurance claim history compared to their peers in the same city."

Watch this video:

Advanced SQL Detective Kit

Self-Study Task:

  1. Open DbGate.
  2. Create a new "DuckDB" connection.
  3. Point it to the unit-1-5.db file.
  4. Run: SELECT * FROM client LIMIT 5; to verify connection.

Ready? See you in class where we turn these tables into insights!