Introduction to SQL
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Introduction to SQL Sandbox

    👋 Welcome to your new workspace! You can use this interactive notebook to take notes, explore the course data, and practice your SQL skills!

    The books table from Introduction to SQL is available for you to query in the SQL cell below! Click inside the cell and press "Run" to execute the pre-written query or write your own query!

    Unknown integration
    DataFrameavailable as
    books
    variable
    -- Select all entries from the books table
    SELECT * 
    FROM books
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Click "Add markdown" to add and edit text cells for notes, and "Add SQL" to continue practicing your queries!

    Introduction to SQL Interactive Cheat Sheet

    Below are some interactive examples of things you learned from the course. Bookmark this page as a reference and a place to experiment with queries!

    Use SELECT and FROM to retrieve rows from a specified table or view.

    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT title
    FROM books
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Use * to select all fields from a table.

    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT *
    FROM books
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Use AS to rename columns with an alias.

    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT title AS book_title
    FROM books
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Use DISTINCT to select unique records or combinations of records.

    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT DISTINCT author
    FROM books
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Use LIMIT to limit the results of your query to a specified number of rows.

    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT title
    FROM books
    LIMIT 5
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Query other data

    Want to continue to practice your SQL skills with different data? Try out the following: