Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GROUP BY age / 10
- CREATE TABLE #temp (age NVARCHAR(20))
- INSERT INTO #temp
- SELECT '22'
- UNION
- SELECT '24'
- UNION
- SELECT '20.10.1984'
- UNION
- SELECT '50'
- SELECT age/10, COUNT(*)
- FROM #temp
- WHERE ISNUMERIC(age) = 1
- GROUP BY age/10
- DROP TABLE #temp
Add Comment
Please, Sign In to add comment