Agent skill
sql-and-query-mastery
Install this agent skill to your Project
npx add-skill https://github.com/Gaku52/claude-code-skills/tree/main/06-data-and-security/sql-and-query-mastery
SKILL.md
日本語版
SQL and Query Mastery
SQL is the universal language of data manipulation. This skill systematically covers everything from basic syntax to advanced window functions, query optimization, execution plan analysis, and database-specific features.
Target Audience
- Engineers who want to learn SQL systematically
- Developers looking to optimize query performance
- Those involved in database design and operations
Prerequisites
- Foundational understanding of relational databases
- Basic SQL knowledge (SELECT/INSERT/UPDATE/DELETE)
Study Guide
00-basics — SQL Fundamentals
| # | File | Description |
|---|
01-advanced — Advanced SQL
| # | File | Description |
|---|
02-optimization — Query Optimization
| # | File | Description |
|---|
03-specific — Database-Specific Features
| # | File | Description |
|---|
Quick Reference
SQL Performance Checklist:
✓ Verify execution plans with EXPLAIN ANALYZE
✓ Create appropriate indexes
✓ Avoid SELECT *; query only the columns you need
✓ Resolve N+1 queries with JOINs
✓ For large datasets, use cursor-based pagination instead of LIMIT/OFFSET
✓ Perform aggregations on the database side
References
- PostgreSQL. "Documentation." postgresql.org/docs, 2024.
- Winand, M. "SQL Performance Explained." use-the-index-luke.com, 2012.
- Molinaro, A. "SQL Cookbook." O'Reilly, 2020.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
computer-science-fundamentals
A comprehensive guide covering the fundamentals of computer science. From hardware internals and data representation to algorithms, data structures, computation theory, programming paradigms, and software engineering basics — a systematic guide to all the CS foundations every engineer needs.
operating-system-guide
programming-language-fundamentals
algorithm-and-data-structures
linux-cli-mastery
aws-cloud-guide
Didn't find tool you were looking for?