Skip to content

corticalstack/sql-deep-dive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” SQL Deep Dive

A comprehensive collection of SQL examples demonstrating various SQL concepts and operations using Microsoft SQL Server.

πŸ“š Description

This repository contains a curated set of SQL examples that cover everything from basic queries to advanced database operations. It serves as both a learning resource and a quick reference guide for SQL developers working with Microsoft SQL Server, specifically using the AdventureWorksLT sample database.

✨ Features

The examples cover a wide range of SQL operations including:

  • Basic Queries: Simple SELECT statements and column selection
  • Filtering: WHERE clauses with various operators and conditions
  • Aggregation: COUNT, MAX, MIN, AVG functions with GROUP BY
  • Sorting: ORDER BY for result organization
  • NULL Handling: Testing for NULL and NOT NULL values
  • Result Limiting: Using TOP and PERCENT
  • Pattern Matching: LIKE operator with wildcards
  • Aliasing: Column and table aliases
  • Joins: INNER, LEFT, RIGHT, and FULL OUTER joins
  • Subqueries: Nested SELECT statements
  • Set Operations: UNION for combining result sets
  • Conditional Logic: CASE expressions
  • Data Manipulation: INSERT, UPDATE, and DELETE operations
  • Database Objects: Creating and managing databases, tables, indexes, and views

πŸš€ Usage

Prerequisites

  • Microsoft SQL Server (any recent version)
  • AdventureWorksLT sample database

Setup

  1. Install Microsoft SQL Server if you haven't already

  2. Download and attach the AdventureWorksLT sample database:

    # Download link
    https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure
    
  3. Connect to your SQL Server instance

  4. Run the examples from the examples.sql file

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”— Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published