This document defines the consistent internal structure for each main topic folder.
- Separate learning from doing: Clear distinction between theory and practice
- Consistent structure: Same organization across all topics
- Easy navigation: Students know exactly where to find what they need
- Professional appearance: Clean, organized structure
Each main topic folder (like 6-Grouping-and-Aggregation/) should contain:
6-Grouping-and-Aggregation/
├── README.md # Main topic overview and navigation
│
├── 📁 concepts/ # Learning materials (theory)
│ ├── group-by-basics.md # Core concept explanations
│ ├── having-clause.md # Detailed theory and rules
│ ├── advanced-grouping.md # Complex concepts
│ └── visual-examples.md # Diagrams and visual aids
│
├── 📁 examples/ # SQL code demonstrations
│ ├── 01-group-by-examples.sql # Working code examples
│ ├── 02-having-clause-examples.sql # Practical demonstrations
│ ├── 03-advanced-grouping.sql # Complex examples
│ └── sample-data.sql # Test data for examples
│
├── 📁 exercises/ # Practice problems
│ ├── README.md # Exercise instructions
│ ├── beginner-exercises.sql # Easy practice problems
│ ├── intermediate-exercises.sql # Medium difficulty
│ ├── advanced-exercises.sql # Challenging problems
│ └── solutions.sql # All exercise solutions
│
└── 📁 resources/ # Optional: Additional materials
├── cheat-sheet.md # Quick reference
├── common-mistakes.md # Things to avoid
└── performance-tips.md # Optimization advice
When to use: When you want to understand the concept
- Explanations of how things work
- Rules and syntax guidelines
- When to use different approaches
- Best practices and conventions
When to use: When you want to see working code
- Runnable SQL examples
- Step-by-step demonstrations
- Real-world use cases
- Code you can copy and modify
When to use: When you want to test your knowledge
- Hands-on practice problems
- Progressive difficulty levels
- Self-assessment opportunities
- Solutions for checking your work
When to use: When you need quick answers
- Cheat sheets and summaries
- Common troubleshooting
- Performance optimization tips
- Always lowercase:
concepts/,examples/,exercises/ - Descriptive and consistent across topics
- Markdown files: lowercase with hyphens:
group-by-basics.md - SQL files: numbered for sequence:
01-basic-examples.sql - README files: always
README.md
Students should follow this path:
- Start: Read main
README.mdfor topic overview - Learn: Study files in
/concepts/folder - See: Run examples from
/examples/folder - Practice: Complete exercises in
/exercises/folder - Reference: Use
/resources/for quick lookup
Let's reorganize 6-Grouping-and-Aggregation/ as an example:
6-Grouping-and-Aggregation/
├── 01_group_by.sql ❌ Mixed code and docs
├── 02_having_clause.sql ❌ Mixed code and docs
├── Advanced_Grouping.md ❌ Mixed code and docs
├── GROUP_BY.md ❌ Mixed code and docs
└── HAVING_Clause.md ❌ Mixed code and docs
6-Grouping-and-Aggregation/
├── README.md ✅ Clear topic overview
├── concepts/
│ ├── group-by-basics.md ✅ Theory separated
│ ├── having-clause.md ✅ Theory separated
│ └── advanced-grouping.md ✅ Theory separated
├── examples/
│ ├── 01-group-by-examples.sql ✅ Code separated
│ ├── 02-having-examples.sql ✅ Code separated
│ └── 03-advanced-examples.sql ✅ Code separated
└── exercises/
├── README.md ✅ Practice problems
├── practice-problems.sql ✅ Practice problems
└── solutions.sql ✅ Practice problems
- ✅ Clear learning path: Know exactly what to do next
- ✅ Find things quickly: Predictable organization
- ✅ Separate concerns: Theory vs practice vs exercises
- ✅ Progressive learning: Build skills step by step
- ✅ Easy to add content: Know exactly where new material goes
- ✅ Consistent maintenance: Same structure everywhere
- ✅ Clear purpose: Each file has a specific role
- ✅ Scalable organization: Works for any topic complexity
- ✅ Professional appearance: Looks organized and mature
- ✅ Better discoverability: Content is easier to find
- ✅ Improved navigation: Clear relationships between materials
- ✅ Future-proof: Structure accommodates growth
- Choose pilot folder to reorganize first
- Create subfolder structure within existing topic
- Move and rename files to match new organization
- Update README files with new navigation
- Test the learning flow with reorganized content
- Apply to all remaining folders systematically