Skip to content

genomix/snowflake-sql-unique

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snowflake SQL

All demo source code for my Udemy course Improvements to Snowflake SQL Masterclass Hands-On.

logo

To use this repo with my course, you can clone it and open it locally with VS Code. Then, for each lecture, locate the demo files by looking at the section and the specific SQL file. Copy and paste that file in a SQL worksheet in Snowsight, rather then running it from within VS Code.

I used number prefixes to make it easier to locate both the section and the lecture.

Sections

  1. Simplified Queries
  • Create a Free Snowflake Trial Account
  • Simplified Snowflake SQL
  • Simplified Joins
  • Reused Expressions
  • Table Functions
  • TABLE vs LATERAL
  • Include/Exclude Groups of Columns
  1. Filters
  • Limiting Data in SQL
  • Filter Window Functions with QUALIFY
  • Case Insensitive Queries
  • Regular Expressions
  • Patterns with MATCH_RECOGNIZE
  • Full-Text SEARCH
  • Sort with NULLS FIRST/LAST
  1. Joins
  • Common Join Types
  • LATERAL Joins
  • “Exploding” Joins
  • ASOF Joins
  • Fuzzy Matching
  • Directed Joins
  1. Aggregates
  • COUNT_IF Function
  • Pivot Data
  • Unpivot Data
  • ANY_VALUE Function
  • MIN_BY and MAX_BY Functions
  • Count Distinct Values
  1. Persisting Data
  • Permanent Tables
  • Table Constraints
  • Hybrid Tables with Indexes
  • Multi-Table INSERT
  • Bulk File Upload with Schema Inference
  • Changing Persisted Data
  1. Generating Data
  • Sequences and Identity Columns
  • Synthetic Data Generation
  • SAMPLE Data Extraction
  • RESAMPLE for Time Series
  • Generate Similar Table Data
  • Time Travel and Fail Safe
  • Zero-Copy Cloning
  1. Subqueries and CTEs
  • Uncorrelated and Correlated Subqueries
  • Subquery Operators
  • Common Table Expressions (CTEs)
  • Subqueries to CTEs
  • Pipe Operator (->>)
  • Set Operators
  • Union BY NAME
  • Similarity Between Sets
  1. Grouping Data
  • Duplicate and Distinct Values
  • MIN_BY and MAX_BY with Duplicates
  • Grouping Sets
  • OVER Clause
  • Ranking Window Functions
  • Offset Window Functions
  • Window Function Frames
  1. Tabular Hierarchical Data
  • Hierarchies from Tabular Metadata
  • Fixed-Depth Data Hierarchies
  • Variable-Depth Data Hierarchies
  • CONNECT_BY Recursive Queries
  • Recursive CTEs and Views
  • Role Hierarchy with Recursive Queries
  • Nested Transactions
  1. Semi-Structured Data
  • Array Aggregations
  • Object Dictionaries
  • FLATTEN Arrays
  • Parse JSON Hierarchies
  • Higher-Order Functions
  • String Lists vs Arrays
  • Expansion Spread Operator (**)
  • Parsing XML Data
  1. Procedures and Functions
  • Sessions and SQL Worksheets
  • Stored Procedures and UDFs
  • Python Worksheets
  • Vectorized Python UDFs
  • User-Defined Table Functions (UDTFs)
  • User-Defined Aggregate Functions (UDAFs)
  1. ETL/ELT Pipelines
  • Manual CDC (Change Data Capture)
  • SELECT CHANGES Clause
  • MERGE with Streams and Tasks
  • MERGE with ALL BY NAME
  • Dynamic Tables
  • Immutability Constraints
  1. Snowflake Scripting
  • Snowflake Scripting Blocks
  • Conditional and Ternary Logic
  • LEAST and GREATEST Functions
  • Cursor and ResultSet
  1. SQL for Machine Learning
  • Statistics for Modern Data Science
  • Classes in Object-Oriented SQL
  • ML Data Preparation
  • ML Classification
  • ML Forecasting
  • ML Anomaly Detection
  • ML Contribution Explorer
  1. Snowflake Cortex Functions
  • Snowflake Cortex LLM Functions
  • Snowflake Cortex AISQL Functions
  • Query Generation with Snowflake Copilot
  • Cortex Analyst with Semantic Views
  • Vector Embeddings

About

For my Udemy course "Improvements to Snowflake SQL Masterclass Hands-On"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PLpgSQL 67.5%
  • PLSQL 32.5%