Skip to content
FULL Project
  • AI Chat
  • Code
  • Report
  • Full Project

    This is a full project in stages

    Databases = Store and Organize Data Electronically

    Relational Databases

    Query Data (PostgreSQL Query)

    Basic Queries

    Unknown integration
    DataFrameavailable as
    df63
    variable
     -- Select all columns from the TABLES system database
     SELECT * 
     FROM INFORMATION_SCHEMA.TABLES
     -- Filter by schema
     WHERE table_schema = 'public';
    Unknown integration
    DataFrameavailable as
    df64
    variable
     -- Select all columns from the COLUMNS system database
     SELECT * 
     FROM INFORMATION_SCHEMA.COLUMNS 
     WHERE table_name = 'actor';
    Unknown integration
    DataFrameavailable as
    df65
    variable
    -- Get the column name and data type
    SELECT
     	column_name, 
        data_type
    -- From the system database information schema
    FROM INFORMATION_SCHEMA.COLUMNS 
    -- For the customer table
    WHERE table_name = 'customer';
    Unknown integration
    DataFrameavailable as
    df1
    variable
    SELECT *
    FROM books
    Unknown integration
    DataFrameavailable as
    df2
    variable
    SELECT DISTINCT author AS unique_author
    FROM books;
    Unknown integration
    DataFrameavailable as
    df3
    variable
    CREATE VIEW library_authors AS
    SELECT DISTINCT author AS unique_author
    FROM books;
    Unknown integration
    DataFrameavailable as
    df4
    variable
    -- Select the first 10 genres from books using PostgreSQL
    SELECT genre, author
    FROM books
    LIMIT 10;
    Unknown integration
    DataFrameavailable as
    df5
    variable
    SELECT COUNT (*) AS count_records
    FROM people;
    Unknown integration
    DataFrameavailable as
    df6
    variable
    -- Select film_ids and imdb_score with an imdb_score over 7.0
    SELECT film_id, imdb_score
    FROM reviews
    WHERE imdb_score > 7;