๊ด€๋ฆฌ ๋ฉ”๋‰ด

๋ชฉ๋กSQL ๋ฐ์ดํ„ฐ ๊ทธ๋ฃนํ™” (1)

Hey Tech

[SQLite] GROUP BY: ๋ฐ์ดํ„ฐ๋ฅผ ๊ทธ๋ฃนํ™”ํ•˜๊ธฐ! (Feat. HAVING)

์•ˆ๋…•ํ•˜์„ธ์š”, ์˜ค๋Š˜์€ GROUP BY ๊ตฌ๋ฌธ์„ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ทธ๋ฃนํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๊ณต์œ ํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๋ฐ”๋กœ ์‹œ์ž‘ํ•˜์ฃ ! GROUP BY๋Š” ์–ธ์ œ ์“ธ๊นŒ? ์ด์ „ ํฌ์ŠคํŒ…์—์„œ ์„œ๋กœ ๋‹ค๋ฅธ ๋‘ ์นผ๋Ÿผ์„ ๋ณ‘ํ•ฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๋‹ค๋ฃจ์—ˆ์Šต๋‹ˆ๋‹ค. heytech.tistory.com/28?category=453619 [SQLite] ์„œ๋กœ ๋‹ค๋ฅธ ์นผ๋Ÿผ์˜ ๋ฐ์ดํ„ฐ ๋ณ‘ํ•ฉํ•˜๊ธฐ! ์•ˆ๋…•ํ•˜์„ธ์š”, ์˜ค๋Š˜์€ ์„œ๋กœ ๋‹ค๋ฅธ ์นผ๋Ÿผ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณ‘ํ•ฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๊ณต์œ ํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋„ SQLite ๋ฐ ์—ฐ์Šต์šฉ ๋ฐ์ดํ„ฐ์…‹(MLB ์„ ์ˆ˜ ์ •๋ณด)์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์„ค๋ช…ํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค. SQLite ๋ฐ ์—ฐ์Šต heytech.tistory.com SELECT nameFirst || ' ' || nameLast AS FullName FROM People LIMIT 20; ์—ฐ์Šต์šฉ..