-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
CREATE TABLE tbl (id INTEGER IDENTITY PRIMARY KEY, v REAL)
GO
INSERT INTO tbl(v) VALUES(0.000)
GO
INSERT INTO tbl(v) VALUES(0.005)
GO
INSERT INTO tbl(v) VALUES(0.010)
GO
INSERT INTO tbl(v) VALUES(0.015)
GO
INSERT INTO tbl(v) VALUES(0.020)
GO
INSERT INTO tbl(v) VALUES(0.030)
GO
INSERT INTO tbl(v) VALUES(0.040)
GO
INSERT INTO tbl(v) VALUES(0.050)
GO
INSERT INTO tbl(v) VALUES(0.090)
GO
SELECT CAST(50*v AS INTEGER)/50.0,CAST(50*v AS INTEGER)/50.0+0.02,COUNT(*)
FROM tbl
GROUP BY CAST(50*v AS INTEGER)/50.0,CAST(50*v AS INTEGER)/50.0+0.02
GO
DROP TABLE Tbl
GO
