--- id: sql-min title: "SQL Min" category: "Database" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["SQL MIN() Function", "MIN function", "SQL μ΅œμ†Ÿκ°’"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.9 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["sql", "database", "w3schools", "min", "aggregate"] raw_sources: ["https://www.w3schools.com/sql/sql_min_max.asp"] applied_in: [] github_commit: "" --- # [[SQL Min]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) MIN() returns the smallest value in a column across numeric, string, or date types, and its unnamed result column typically needs an alias. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **MIN() function** β€” returns the smallest value of the selected column; works with numeric, string, and date data types. [S1] - **Syntax** β€” `SELECT MIN(column_name) FROM table_name WHERE condition;`. [S1] - **Unnamed result** β€” MIN()'s returned column has no name by default; use `AS` to give it a descriptive alias. [S1] - **MIN() with GROUP BY** β€” returns the smallest value per group, e.g. lowest price per category. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Lowest price: `SELECT MIN(Price) FROM Products;`. [S1] - With alias: `SELECT MIN(Price) AS SmallestPrice FROM Products;`. [S1] - On a date column: `SELECT MIN(BirthDate) AS EarliestBirthdate FROM Employees;`. [S1] - With GROUP BY: `SELECT MIN(Price) AS SmallestPrice, CategoryID FROM Products GROUP BY CategoryID;`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ†ŒμŠ€μ—μ„œ λͺ¨μˆœλ˜λŠ” μ •λ³΄λŠ” λ°œκ²¬λ˜μ§€ μ•ŠμŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” MAX()와 짝을 이뀄 λ²”μœ„(μ΅œμ†Œ~μ΅œλŒ€) λ¦¬ν¬νŠΈμ— 자주 ν•¨κ»˜ 쓰인닀. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) MIN with alias and GROUP BY (SQL): ```sql SELECT MIN(Price) AS SmallestPrice, CategoryID FROM Products GROUP BY CategoryID; ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.90 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[SQL Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[SQL Aggregate Functions]], [[SQL Max]], [[SQL Group By]] - **μ°Έμ‘° λ§₯락:** μ΅œμ†Ÿκ°’ μ‘°νšŒκ°€ ν•„μš”ν•œ λͺ¨λ“  리포트의 κΈ°λ³Έ ν•¨μˆ˜ β€” MAX()와 λŒ€μΉ­ 관계. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” SQL MIN() Function β€” https://www.w3schools.com/sql/sql_min_max.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "SQL MIN() Function" page (Astra wiki-curation, P-Reinforce v3.1 format).