전체 글

전체 글

    [SQL 배우기] Section 8. Creating Databases and Tables

    Data types in SQL: Boolean True, False Character char, varchar, text Numeric integer, float Temporal date, time, timestamp, interval UUID Array JSON PostgreSQL: Documentation: 16: Chapter 8. Data Types Primary key: a column or a group of columns used to identify a row uniquely in a table\ represented by [PK] in pgAdmin Foreign key: a field or group of fields that references the primary key of th..

    [SQL 배우기] Section 6. Advanced SQL Commands

    The Complete SQL Bootcamp for the Manipulation and Analysis of Data | Udemy Types of time information: TIME: time DATE: date TIMESTAMP: time, date TIMESTAMPTZ: date, time, and timezone The time information cannot be added although it can be removed SHOW ALL: shows all the metadata related to the database can show other details by using other functions such as: SHOW TIMEZONE SELECT NOW() SELECT T..

    [SQL 배우기] Section 5. JOINS

    [SQL 배우기] Section 5. JOINS

    The Complete SQL Bootcamp for the Manipulation and Analysis of Data | Udemy AS: creates an alias for a column to be called into a different name SELECT column AS new_name FROM table we cannot use an alias inside the WHERE operator because it gets executed at the very end of a query useful for renaming the output of the aggregate function JOIN: allows to combine multiple tables main reason for di..

    [SQL 배우기] Section 3. GROUP BY Statements

    Aggregate function: take multiple inputs and return a single output AVG(), COUNT(), MAX(), MIN(), SUM() can only happen in the SELECT or HAVING clause ordering result of the aggregate function requires ORDER BY reference to the entire function GROUP BY: allows for the aggregation of columns by some category must appear right after a FROM or WHERE statement you can use an aggregate function with ..