Skip to content
SQL and Query Mastery logo

SQL and Query Mastery

[日本語版](../../ja/06-data-and-security/sql-and-query-mastery/SKILL.md)

SKILL.md

Full skill instructions

日本語版

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

#FileDescription

01-advanced — Advanced SQL

#FileDescription

02-optimization — Query Optimization

#FileDescription

03-specific — Database-Specific Features

#FileDescription

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

  1. PostgreSQL. "Documentation." postgresql.org/​docs, 2024.
  2. Winand, M. "SQL Performance Explained." use-the-index-luke.com, 2012.
  3. Molinaro, A. "SQL Cookbook." O'Reilly, 2020.