[MySQL] Number of items between range
Posted: Tue Nov 13, 2007 1:12 pm
Hey guys,
can you help me with following problem?
I need to get results like this:
Thanks for help.
can you help me with following problem?
Code: Select all
CREATE TABLE `items` (
`id` int(10) unsigned NOT NULL auto_increment,
`price` int(11) default NULL,
PRIMARY KEY (`pid`)
)Code: Select all
price range | number of items
0-50 | 0
0-100 | 6
0-150 | 7
0-200 | 8