# lenhattung/sqlserver architecture

> Architecture diagram of the GitHub repository lenhattung/sqlserver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lenhattung/sqlserver
- Repository: https://github.com/lenhattung/sqlserver

## Overview

This repository is a Vietnamese SQL Server learning collection, accompanied by a Northwind database asset. Its principal user workflow is to study standalone lesson files covering query construction, advanced querying, and database operations; the Northwind files provide a sample database resource. The tree documents topics but no execution framework or links between lessons and the database. With no README content or source excerpts, relationships between these components cannot be established, so the graph shows the documented learning areas without inferred call or data-flow edges.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_query["Query Basics"]
  node_select["SELECT"]
  node_distinct["SELECT DISTINCT"]
  node_top["SELECT TOP"]
  node_alias["Aliases"]
  node_aggregates["Min Max Count"]
  node_aggregate_stats["Count Sum AVG"]
  node_ordering["Ordering<br/>[10-Order By.sql]"]
  node_arithmetic["Arithmetic"]
  node_where["WHERE"]
  node_logical["Logical Operators<br/>[13-And-Or-Not.sql]"]
  node_between["BETWEEN"]
  node_like["LIKE"]
  node_wildcards["Wildcards<br/>[16-Wildcard.sql]"]
  node_in["IN Operators<br/>[17-IN-NOT IN.sql]"]
  node_null_checks["NULL Checks"]
  node_grouping["GROUP BY<br/>[19-GROUP BY.sql]"]
  node_date_parts["Date Parts"]
  node_having["HAVING<br/>[21-HAVING.sql]"]
  node_review["Query Exercises"]
end

subgraph group_advanced["Advanced Queries"]
  node_multi_table["Multi-table Queries"]
  node_multi_table_exercises["Multi-table Exercises"]
  node_union["UNION"]
  node_joins["JOIN Variants"]
  node_join_exercises["JOIN Exercises"]
  node_subqueries["Subqueries<br/>[28-Sub query.sql]"]
  node_subquery_exercises["Subquery Exercises"]
  node_execution_order["Execution Order"]
  node_cte["Common Table Expressions"]
  node_recursive_queries["Recursive Queries"]
  node_windows["Window Functions"]
end

subgraph group_operations["Database Operations"]
  node_create_database["Create Database"]
  node_create_table["Create Table<br/>[36-Tạo Table.sql]"]
  node_insert["INSERT"]
  node_select_into["SELECT INTO"]
end

subgraph group_sample["Northwind Sample"]
end

click node_select "https://github.com/lenhattung/sqlserver/blob/main/04-Cau%20lenh%20SELECT.sql"
click node_distinct "https://github.com/lenhattung/sqlserver/blob/main/05-Cau%20lenh%20SELECT%20DISTINCT.sql"
click node_top "https://github.com/lenhattung/sqlserver/blob/main/06-Cau%20lenh%20SELECT%20TOP.sql"
click node_alias "https://github.com/lenhattung/sqlserver/blob/main/07-Alias%20-%20Bi%20danh%20-T%C3%AAn%20thay%20the.sql"
click node_aggregates "https://github.com/lenhattung/sqlserver/blob/main/08-Tim%20gia%20tri%20Min%20Max.sql"
click node_aggregate_stats "https://github.com/lenhattung/sqlserver/blob/main/09-Count-Sum-AVG.sql"
click node_ordering "https://github.com/lenhattung/sqlserver/blob/main/10-Order%20By.sql"
click node_arithmetic "https://github.com/lenhattung/sqlserver/blob/main/11-Cac%20phep%20toan%20cong%2C%20tru%2C%20nhan%2C%20chia%2C%20modulo.sql"
click node_where "https://github.com/lenhattung/sqlserver/blob/main/12-Menh%20de%20Where.sql"
click node_logical "https://github.com/lenhattung/sqlserver/blob/main/13-And-Or-Not.sql"
click node_between "https://github.com/lenhattung/sqlserver/blob/main/14-Toan%20tu%20BETWEEN.sql"
click node_like "https://github.com/lenhattung/sqlserver/blob/main/15-Toan%20tu%20LIKE.sql"
click node_wildcards "https://github.com/lenhattung/sqlserver/blob/main/16-Wildcard.sql"
click node_in "https://github.com/lenhattung/sqlserver/blob/main/17-IN-NOT%20IN.sql"
click node_null_checks "https://github.com/lenhattung/sqlserver/blob/main/18-IS%20NULL%20-%20IS%20NOT%20NULL.sql"
click node_grouping "https://github.com/lenhattung/sqlserver/blob/main/19-GROUP%20BY.sql"
click node_date_parts "https://github.com/lenhattung/sqlserver/blob/main/20-Day-Month-Year.sql"
click node_having "https://github.com/lenhattung/sqlserver/blob/main/21-HAVING.sql"
click node_review "https://github.com/lenhattung/sqlserver/blob/main/22-Bai%20tap%20On%20tap.sql"
click node_multi_table "https://github.com/lenhattung/sqlserver/blob/main/23-Truy%20van%20du%20lieu%20tu%20nhieu%20Table.sql"
click node_multi_table_exercises "https://github.com/lenhattung/sqlserver/blob/main/24-Bai%20tap%20truy%20van%20du%20lieu%20tu%20nhieu%20Table.sql"
click node_union "https://github.com/lenhattung/sqlserver/blob/main/25-Union%20-%20ket%20hop%20du%20lieu%20tu%20nhieu%20ket%20qua.sql"
click node_joins "https://github.com/lenhattung/sqlserver/blob/main/26-Cac%20cau%20lenh%20JOIN%20-%20LEFT%20JOIN%20-%20RIGHT%20JOIN%20-%20FULL%20JOIN.sql"
click node_join_exercises "https://github.com/lenhattung/sqlserver/blob/main/27-Bai%20tap%20cac%20cau%20lenh%20JOIN.sql"
click node_subqueries "https://github.com/lenhattung/sqlserver/blob/main/28-Sub%20query.sql"
click node_subquery_exercises "https://github.com/lenhattung/sqlserver/blob/main/29-Bai%20tap%20SUBQUERY.sql"
click node_execution_order "https://github.com/lenhattung/sqlserver/blob/main/30-Thu%20tu%20thuc%20thi%20cau%20lenh%20SQL.sql"
click node_cte "https://github.com/lenhattung/sqlserver/blob/main/31-Common%20Table%20Expression.sql"
click node_recursive_queries "https://github.com/lenhattung/sqlserver/blob/main/32-Truy%20v%E1%BA%A5n%20%C4%91%E1%BB%87%20quy.sql"
click node_windows "https://github.com/lenhattung/sqlserver/blob/main/33-Windows%20Functions.sql"
click node_create_database "https://github.com/lenhattung/sqlserver/blob/main/35-T%E1%BA%A1o%20c%C6%A1%20s%E1%BB%9F%20d%E1%BB%AF%20li%E1%BB%87u.sql"
click node_create_table "https://github.com/lenhattung/sqlserver/blob/main/36-T%E1%BA%A1o%20Table.sql"
click node_insert "https://github.com/lenhattung/sqlserver/blob/main/38-C%C3%A2u%20l%E1%BB%87nh%20INSERT.sql"
click node_select_into "https://github.com/lenhattung/sqlserver/blob/main/39-C%C3%A2u%20l%E1%BB%87nh%20SELECT%20INTO.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_select,node_distinct,node_top,node_alias,node_aggregates,node_aggregate_stats,node_ordering,node_arithmetic,node_where,node_logical,node_between,node_like,node_wildcards,node_in,node_null_checks,node_grouping,node_date_parts,node_having,node_review toneBlue
class node_multi_table,node_multi_table_exercises,node_union,node_joins,node_join_exercises,node_subqueries,node_subquery_exercises,node_execution_order,node_cte,node_recursive_queries,node_windows toneAmber
class node_create_database,node_create_table,node_insert,node_select_into toneMint
```

## Components

### Query Basics

- [SELECT](https://github.com/lenhattung/sqlserver/blob/main/04-Cau%20lenh%20SELECT.sql): `04-Cau lenh SELECT.sql`
- [SELECT DISTINCT](https://github.com/lenhattung/sqlserver/blob/main/05-Cau%20lenh%20SELECT%20DISTINCT.sql): `05-Cau lenh SELECT DISTINCT.sql`
- [SELECT TOP](https://github.com/lenhattung/sqlserver/blob/main/06-Cau%20lenh%20SELECT%20TOP.sql): `06-Cau lenh SELECT TOP.sql`
- [Aliases](https://github.com/lenhattung/sqlserver/blob/main/07-Alias%20-%20Bi%20danh%20-T%C3%AAn%20thay%20the.sql): `07-Alias - Bi danh -Tên thay the.sql`
- [Min Max Count](https://github.com/lenhattung/sqlserver/blob/main/08-Tim%20gia%20tri%20Min%20Max.sql): `08-Tim gia tri Min Max.sql`
- [Count Sum AVG](https://github.com/lenhattung/sqlserver/blob/main/09-Count-Sum-AVG.sql): `09-Count-Sum-AVG.sql`
- [Ordering](https://github.com/lenhattung/sqlserver/blob/main/10-Order%20By.sql): `10-Order By.sql`
- [Arithmetic](https://github.com/lenhattung/sqlserver/blob/main/11-Cac%20phep%20toan%20cong%2C%20tru%2C%20nhan%2C%20chia%2C%20modulo.sql): `11-Cac phep toan cong, tru, nhan, chia, modulo.sql`
- [WHERE](https://github.com/lenhattung/sqlserver/blob/main/12-Menh%20de%20Where.sql): `12-Menh de Where.sql`
- [Logical Operators](https://github.com/lenhattung/sqlserver/blob/main/13-And-Or-Not.sql): `13-And-Or-Not.sql`
- [BETWEEN](https://github.com/lenhattung/sqlserver/blob/main/14-Toan%20tu%20BETWEEN.sql): `14-Toan tu BETWEEN.sql`
- [LIKE](https://github.com/lenhattung/sqlserver/blob/main/15-Toan%20tu%20LIKE.sql): `15-Toan tu LIKE.sql`
- [Wildcards](https://github.com/lenhattung/sqlserver/blob/main/16-Wildcard.sql): `16-Wildcard.sql`
- [IN Operators](https://github.com/lenhattung/sqlserver/blob/main/17-IN-NOT%20IN.sql): `17-IN-NOT IN.sql`
- [NULL Checks](https://github.com/lenhattung/sqlserver/blob/main/18-IS%20NULL%20-%20IS%20NOT%20NULL.sql): `18-IS NULL - IS NOT NULL.sql`
- [GROUP BY](https://github.com/lenhattung/sqlserver/blob/main/19-GROUP%20BY.sql): `19-GROUP BY.sql`
- [Date Parts](https://github.com/lenhattung/sqlserver/blob/main/20-Day-Month-Year.sql): `20-Day-Month-Year.sql`
- [HAVING](https://github.com/lenhattung/sqlserver/blob/main/21-HAVING.sql): `21-HAVING.sql`
- [Query Exercises](https://github.com/lenhattung/sqlserver/blob/main/22-Bai%20tap%20On%20tap.sql): `22-Bai tap On tap.sql`

### Advanced Queries

- [Multi-table Queries](https://github.com/lenhattung/sqlserver/blob/main/23-Truy%20van%20du%20lieu%20tu%20nhieu%20Table.sql): `23-Truy van du lieu tu nhieu Table.sql`
- [Multi-table Exercises](https://github.com/lenhattung/sqlserver/blob/main/24-Bai%20tap%20truy%20van%20du%20lieu%20tu%20nhieu%20Table.sql): `24-Bai tap truy van du lieu tu nhieu Table.sql`
- [UNION](https://github.com/lenhattung/sqlserver/blob/main/25-Union%20-%20ket%20hop%20du%20lieu%20tu%20nhieu%20ket%20qua.sql): `25-Union - ket hop du lieu tu nhieu ket qua.sql`
- [JOIN Variants](https://github.com/lenhattung/sqlserver/blob/main/26-Cac%20cau%20lenh%20JOIN%20-%20LEFT%20JOIN%20-%20RIGHT%20JOIN%20-%20FULL%20JOIN.sql): `26-Cac cau lenh JOIN - LEFT JOIN - RIGHT JOIN - FULL JOIN.sql`
- [JOIN Exercises](https://github.com/lenhattung/sqlserver/blob/main/27-Bai%20tap%20cac%20cau%20lenh%20JOIN.sql): `27-Bai tap cac cau lenh JOIN.sql`
- [Subqueries](https://github.com/lenhattung/sqlserver/blob/main/28-Sub%20query.sql): `28-Sub query.sql`
- [Subquery Exercises](https://github.com/lenhattung/sqlserver/blob/main/29-Bai%20tap%20SUBQUERY.sql): `29-Bai tap SUBQUERY.sql`
- [Execution Order](https://github.com/lenhattung/sqlserver/blob/main/30-Thu%20tu%20thuc%20thi%20cau%20lenh%20SQL.sql): `30-Thu tu thuc thi cau lenh SQL.sql`
- [Common Table Expressions](https://github.com/lenhattung/sqlserver/blob/main/31-Common%20Table%20Expression.sql): `31-Common Table Expression.sql`
- [Recursive Queries](https://github.com/lenhattung/sqlserver/blob/main/32-Truy%20v%E1%BA%A5n%20%C4%91%E1%BB%87%20quy.sql): `32-Truy vấn đệ quy.sql`
- [Window Functions](https://github.com/lenhattung/sqlserver/blob/main/33-Windows%20Functions.sql): `33-Windows Functions.sql`

### Database Operations

- [Create Database](https://github.com/lenhattung/sqlserver/blob/main/35-T%E1%BA%A1o%20c%C6%A1%20s%E1%BB%9F%20d%E1%BB%AF%20li%E1%BB%87u.sql): `35-Tạo cơ sở dữ liệu.sql`
- [Create Table](https://github.com/lenhattung/sqlserver/blob/main/36-T%E1%BA%A1o%20Table.sql): `36-Tạo Table.sql`
- [INSERT](https://github.com/lenhattung/sqlserver/blob/main/38-C%C3%A2u%20l%E1%BB%87nh%20INSERT.sql): `38-Câu lệnh INSERT.sql`
- [SELECT INTO](https://github.com/lenhattung/sqlserver/blob/main/39-C%C3%A2u%20l%E1%BB%87nh%20SELECT%20INTO.sql): `39-Câu lệnh SELECT INTO.sql`
