BEGINNING DATA EXPLORATION WITH SELECT
Basic SELECT Syntax
Querying a Subset of Columns
Using DISTINCT to Find Unique Values
Sorting Data with ORDER BY
Filtering Rows with WHERE
Using LIKE and ILIKE with WHERE
Combining Operators with AND and OR
Putting It All Together
Wrapping Up
Try It Yourself
3
UNDERSTANDING DATA TYPES
Characters
Numbers
Integers
Auto-Incrementing Integers
Decimal Numbers
Choosing Your Number Data Type
Dates and Times
Using the interval Data Type in Calculations
Miscellaneous Types
Transforming Values from One
Type to Another with CAST
CAST Shortcut Notation
Wrapping Up
Try It Yourself
4
IMPORTING AND EXPORTING DATA
Working with Delimited Text Files
Quoting Columns that Contain Delimiters
Handling
Header Rows
Using COPY to Import Data
Importing Census Data Describing Counties
Creating the us_counties_2010 Table
Census Columns and Data Types
Performing the Census Import with COPY
Importing a Subset of Columns with COPY
Adding a Default Value
to a Column During Import
Using COPY to Export Data
Exporting All Data
Exporting Particular Columns
Exporting Query Results
Importing and Exporting Through pgAdmin
Wrapping Up
Try It Yourself
Chia sẻ với bạn bè của bạn: