Practical sql: a beginner’s Guide to Storytelling with Data pdfdrive com


EXTRACTING INFORMATION BY GROUPING AND



tải về 5.77 Mb.
Chế độ xem pdf
trang5/267
Chuyển đổi dữ liệu06.01.2024
Kích5.77 Mb.
#56244
1   2   3   4   5   6   7   8   9   ...   267
Practical SQL A Beginner’s Guide

8
EXTRACTING INFORMATION BY GROUPING AND
SUMMARIZING
Creating the Library Survey Tables
Creating the 2014 Library Data Table
Creating the 2009 Library Data Table
Exploring the Library Data Using Aggregate Functions
Counting Rows and Values Using count()
Finding Maximum and Minimum Values Using max() and min()
Aggregating Data Using GROUP BY
Wrapping Up
Try It Yourself
9
INSPECTING AND MODIFYING DATA
Importing Data on Meat, Poultry, and Egg Producers
Interviewing the Data Set
Checking for Missing Values
Checking for Inconsistent Data Values
Checking for Malformed Values Using length()
Modifying Tables, Columns, and Data
Modifying Tables with ALTER TABLE
Modifying Values with UPDATE
Creating Backup Tables
Restoring Missing Column Values
Updating Values for Consistency
Repairing ZIP Codes Using Concatenation


Updating Values Across Tables
Deleting Unnecessary Data
Deleting Rows from a Table
Deleting a Column from a Table
Deleting a Table from a Database
Using Transaction Blocks to Save or Revert Changes
Improving Performance When Updating Large Tables
Wrapping Up
Try It Yourself
10
STATISTICAL FUNCTIONS IN SQL
Creating a Census Stats Table
Measuring Correlation with corr(Y, X)
Checking Additional Correlations
Predicting Values with Regression Analysis
Finding the Effect of an Independent Variable with r-squared
Creating Rankings with SQL
Ranking with rank() and dense_rank()
Ranking Within Subgroups with PARTITION BY
Calculating Rates for Meaningful Comparisons
Wrapping Up
Try It Yourself
11
WORKING WITH DATES AND TIMES
Data Types and Functions for Dates and Times
Manipulating Dates and Times
Extracting the Components of a timestamp Value
Creating Datetime Values from timestamp Components
Retrieving the Current Date and Time
Working with Time Zones
Finding Your Time Zone Setting
Setting the Time Zone
Calculations with Dates and Times


Finding Patterns in New York City Taxi Data
Finding Patterns in Amtrak Data
Wrapping Up
Try It Yourself

tải về 5.77 Mb.

Chia sẻ với bạn bè của bạn:
1   2   3   4   5   6   7   8   9   ...   267




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương