SQL and databases

Introduction to SQL with AI

Jasmin Ludolf

Senior Data Science Content Developer

Learning SQL with AI

Example of a long query to generate

Introduction to SQL with AI

Learning SQL with AI

Two people running

Introduction to SQL with AI

Learning SQL with AI

Two people running with finisher medal

Introduction to SQL with AI

Learning SQL with AI

$$

⚠️ AI can make mistakes!

$$

Understand SQL to:

  • Spot issues
  • Ask the right questions
  • Trust the results

$$

Person on a laptop learning to code with an AI assistant

Introduction to SQL with AI

Learning SQL with AI

$$

🏆 Course goals:

  • Explore databases
  • Query data using SQL and AI
    • Count, limit, label, and more
  • Write effective prompts
  • Analytical workflow

$$

Person on a laptop learning to code with an AI assistant

Introduction to SQL with AI

Structured Query Language

$$

  • Popular language for communicating with data in databases

$$

  • Database: electronic collection of data

$$

Person on a laptop looking at data

Introduction to SQL with AI

Databases

$$

  • Structured in tables
  • Store massive data

A database table

Introduction to SQL with AI

Databases

$$

  • Structured in tables
  • Store massive data

$$

Storage:

  • Live on servers (powerful computers)
  • Ideal for collaboration

$$

Multiple users querying a database stored on a server

Introduction to SQL with AI

SQL in industry

$$

  • Hospitals treatment outcomes
  • Bank fraud
  • Customer behavior
  • Analysis across industries

$$

Person showing off their analysis

Introduction to SQL with AI

SQL with AI

$$

  • Describe wants in everyday language

$$

  • AI generates the SQL code

$$

  • AI adapts to different SQL variations

$$

Person on a laptop learning to code with an AI assistant

Introduction to SQL with AI

SQL queries

$$

  • Uses commands called queries

$$

  • Instructions telling the server what we want from the database

$$

Person on a laptop looking writing queries

Introduction to SQL with AI

SQL with AI

Prompt: What are the product names?

SELECT product_name
FROM products;

AI assistant receiving a prompt

Introduction to SQL with AI

SQL with AI

Prompt: What are the product names?

SELECT product_name
FROM products;

AI assistant interpreting the prompt

Introduction to SQL with AI

SQL with AI

Prompt: What are the product names?

SELECT product_name
FROM products;

AI assistant writing SQL code

Introduction to SQL with AI

SQL with AI

Prompt: What are the product names?

SELECT product_name
FROM products;

Reviewing the SQL code

Introduction to SQL with AI

SQL with AI

Prompt: What are the product names?

SELECT product_name
FROM products;

Formatting best practices:

  • Capitalize keywords SELECT, FROM
  • ; at the end of a query
Introduction to SQL with AI

Learning SQL with AI

$$

  • Our AI assistant is connected to PoweredHomes database

$$

Person on a laptop learning to code with an AI assistant

Introduction to SQL with AI

Let's practice!

Introduction to SQL with AI

Preparing Video For Download...