Skip to content
Introduction to SQL
  • AI Chat
  • Code
  • Report
  • Introduction to SQL

    Here you can access the books table used in the course.


    Note: When using sample integrations such as those that contain course data, you have read-only access. You can run queries, but cannot make any changes such as adding, deleting, or modifying the data (e.g., creating tables, views, etc.).

    Take Notes

    Add notes about the concepts you've learned and SQL cells with queries you want to keep.

    Add your notes here

    Unknown integration
    DataFrameavailable as
    books
    variable
    -- Add your own queries here
    SELECT * 
    FROM books

    Explore Datasets

    Use the books table to explore the data and practice your skills!

    • Select only the title column.
    • Alias the title column as book_title.
    • Select the distinct author names from the author column.
    • Select all records from the table and limit your results to 10.
    Unknown integration
    DataFrameavailable as
    df
    variable
    SELECT DISTINCT author FROM books;
    Unknown integration
    DataFrameavailable as
    df1
    variable
    -- Select unique authors and genre combinations from the books table
    SELECT DISTINCT
    author, genre
    FROM books;
    Unknown integration
    DataFrameavailable as
    df2
    variable
    -- Alias author so that it becomes unique_author
    SELECT DISTINCT author AS unique_author
    FROM books;
    Unknown integration
    DataFrameavailable as
    df3
    variable
    -- Your code to create the view:
    CREATE VIEW library_authors AS
    SELECT DISTINCT author AS unique_author
    FROM books;
    
    -- Select all columns from library_authors
    SELECT * FROM library_authors;
    
    -- SQL server de mricrosoft u oracle database
       ES un sustema de base de datos relacinal que viene en versiones gratuitas y empresariales  T- SQL  es el tpo de SQL propedad de micros con la base de datos del sql server 
        SELECT TOP (2) name 
        FROM emply;
    
    --Postgre SQL es un sistema de base de datos relacional gratuito y de codigo abierto 
      Creado por la universidad de California Berkey  fue patrocinado por la      DARPA
    
        SELECT id , name 
        FROM emply 
        LIMIT 2;
    Unknown integration
    DataFrameavailable as
    df4
    variable
    -- Select the first 10 genres from books using PostgreSQL
    SELECT id, genre 
    FROM  books
    LIMIT 10;