Op werkdagen voor 23:00 besteld, morgen in huis Gratis verzending vanaf €20

Learning Snowflake SQL and Scripting

Generate, Retrieve, and Automate Snowflake Data

Paperback Engels 2023 1e druk 9781098140328
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

To help you on the path to becoming a Snowflake pro, this concise yet comprehensive guide reviews fundamentals and best practices for Snowflake's SQL and Scripting languages. Developers and data professionals will learn how to generate, modify, and query data in the Snowflake relational database management system as well as how to apply analytic functions for reporting.

Author Alan Beaulieu also shows you how to create scripts, stored functions, and stored procedures to return data sets using Snowflake Scripting. This book is ideal whether you're new to databases and need to run queries or reports against a Snowflake database, or transitioning from databases such as Oracle, SQL Server, or MySQL to cloud-based platforms.

With this book, you will:
- Generate and modify Snowflake data using INSERT, UPDATE, DELETE
- Query data in Snowflake using SELECT, including joining multiple tables, using subqueries, and grouping
- Apply analytic functions for performing subtotals, grand totals, row comparisons, and other reporting functionality
- Build scripts combining SQL statements with looping, if-then-else, and exception handling
- Learn how to build stored procedures and functions
- Use stored procedures to return data sets

Specificaties

ISBN13:9781098140328
Taal:Engels
Bindwijze:paperback
Aantal pagina's:300
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:20-10-2023
Hoofdrubriek:IT-management / ICT
ISSN:

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Over Alan Beaulieu

Alan Beaulieu has been designing, building, and implementing custom database applications for over 20 years. He currently runs his own consulting company that specializes in designing Oracle databases and supporting services in the fields of Financial Services and Telecommunications. In building large databases for both OLTP and OLAP environments, Alan utilizes such Oracle features as Parallel Query, Partitioning, and Parallel Server. Alan has a Bachelor of Science degree in Operations Research from the Cornell University School of Engineering. He lives in Massachusetts with his wife and two daughters.

Andere boeken door Alan Beaulieu

Inhoudsopgave

Preface
Relational Database Primer
Snowflake
What Is SQL?
What Is SQL Scripting?
Setting Up a Sample Database
Sample Database Setup
Sample Database Option #1: Copy from TPCH_SF1
Sample Database Option #2: Load Data from GitHub Files
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments

1. Query Primer
Query Basics
Query Clauses
The select Clause
The from Clause
The where Clause
The group by Clause
The having Clause
The qualify Clause
The order by Clause
The limit Clause
Wrap-Up
Test Your Knowledge

2. Filtering
Condition Evaluation
Using Parentheses
Using the not Operator
Condition Components
Equality Conditions
Inequality Conditions
Range Conditions
Membership Conditions
Matching Conditions
Null Values
Filtering Using Snowsight
Wrap-Up
Test Your Knowledge

3. Joins
What Is a Join?
Table Aliases
Inner Joins
Outer Joins
Cross Joins
Joining Three or More Tables
Joining a Table to Itself
Joining the Same Table Twice
Wrap-Up
Test Your Knowledge

4. Working with Sets
Set Theory Primer
The union Operator
The intersect Operator
The except Operator
Set Operation Rules
Sorting Compound Query Results
Set Operation Precedence
Wrap-Up
Test Your Knowledge

5. Creating and Modifying Data
Data Types
Character Data
Numeric Data
Temporal Data
Other Data Types
Creating Tables
Populating and Modifying Tables
Deleting Data
Modifying Data
Merging Data
Wrap-Up
Test Your Knowledge

6. Data Generation, Conversion, and Manipulation
Working with Character Data
String Generation and Manipulation
String Searching and Extracting
Working with Numeric Data
Numeric Functions
Numeric Conversion
Number Generation
Working with Temporal Data
Date and Timestamp Generation
Manipulating Dates and Timestamps
Date Conversion
Wrap-Up
Test Your Knowledge

7. Grouping and Aggregates
Grouping Concepts
Aggregate Functions
count() Function
min(), max(), avg(), and sum() Functions
listagg() Function
Generating Groups
Multicolumn Grouping
Grouping Using Expressions
Generating Rollups
Filtering on Grouped Data
Filtering with Snowsight
Wrap-Up
Test Your Knowledge

8. Subqueries
Subqueries Defined
Subquery Types
Uncorrelated Subqueries
Correlated Subqueries
Subqueries as Data Sources
Subqueries in the from Clause
Common Table Expressions
Wrap-Up
Test Your Knowledge

9. From Clause Revisited
Hierarchical Queries
Time Travel
Pivot Queries
Random Sampling
Full Outer Joins
Lateral Joins
Table Literals
Wrap-Up
Test Your Knowledge

10. Conditional Logic
What Is Conditional Logic?
Types of Case Expressions
Searched Case Expressions
Simple Case Expressions
Uses for Case Expressions
Pivot Operations
Checking for Existence
Conditional Updates
Functions for Conditional Logic
iff() Function
ifnull() and nvl() Functions
decode() Function
Wrap-Up
Test Your Knowledge

11. Transactions
What Is a Transaction?
Explicit and Implicit Transactions
Related Topics
Finding Open Transactions
Isolation Levels
Locking
Transactions and Stored Procedures
Wrap-Up
Test Your Knowledge

12. Views
What Is a View?
Creating Views
Using Views
Why Use Views?
Data Security
Data Aggregation
Hiding Complexity
Considerations When Using Views
Wrap-Up
Test Your Knowledge

13. Metadata
information_schema
Working with Metadata
Schema Discovery
Deployment Verification
Generating Administration Scripts
get_ddl() Function
account_usage
Wrap-Up
Test Your Knowledge

14. Window Functions
Windowing Concepts
Data Windows
Partitioning and Sorting
Ranking
Ranking Functions
Top/Bottom/Nth Ranking
Qualify Clause
Reporting Functions
Positional Windows
Other Window Functions
Wrap-Up
Test Your Knowledge

15. Snowflake Scripting Language
A Little Background
Scripting Blocks
Scripting Statements
Value Assignment
if
case
Cursors
Loops
Exceptions
Wrap-Up
Test Your Knowledge

16. Building Stored Procedures
Why Use Stored Procedures?
Turning a Script into a Stored Procedure
Stored Procedure Execution
Stored Procedures in Action
Returning Result Sets
Dynamic SQL
Wrap-Up
Test Your Knowledge

17. Table Functions
User-Defined Functions
What Is a Table Function?
Writing Your Own Table Functions
Using Built-In Table Functions
Data Generation
Flattening Rows
Finding and Retrieving Query Results
Wrap-Up
Test Your Knowledge

18. Semistructured Data
Generating JSON from Relational Data
Storing JSON Documents
Querying JSON Documents
Wrap-Up
Test Your Knowledge

A. Sample Database
B. Solutions to Exercises

Index
About the Author

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Learning Snowflake SQL and Scripting