with the following request, I have determined how often a value appears in the field from the Database-table.
SELECT VAL, COUNT(*) AS Frequence
GROUP BY VAL
ORDER BY Frequence
I need to bild Intervals (for example. <-10, -9 to -8, ..., -1 to 0, 1 to 2, ..., 7 to 8, 9 to 10 ) and to determined how often a value appears into each interval.
At the end, I would use Cognos-Report-Studio to create a Bar-Chart... (The intervals appears on the X-Axis.
I use SQL-Server 2005.
Can you help me writting the apprpriate-Query?
Thank your for your help.