ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

MS-SQL

Group by ... Having์ ˆ

๐Ÿ”ฅ fire 2014. 5. 13. 16:46

select UserID, count(UserID) orderCnt from [์ฃผ๋ฌธํ…Œ์ด๋ธ”]
group by UserID
having COUNT(UserID) > 2

 

์ฃผ๋ฌธํ…Œ์ด๋ธ”์—์„œ ์ฃผ๋ฌธํšŸ์ˆ˜ 2ํšŒ์ด์ƒ์ธ ํšŒ์›๋งŒ ๋ฝ‘์•„๋‚ผ๋•Œ.

'MS-SQL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

mssql .bak ํŒŒ์ผ๋กœ ๋ณต์›ํ•˜๊ธฐ  (0) 2015.12.01
์•”ํ˜ธํ™” ์ฒ˜๋ฆฌ์ˆœ์„œ  (0) 2014.10.07
Union ๊ณผ Union all, Select Into  (0) 2014.05.13
์กฐ์ธ Join  (0) 2014.05.13
์Šค์œ™๋ธŒ๋ผ์šฐ์ €  (0) 2014.02.26
๋Œ“๊ธ€