Hi Guys
I think this is an easy one for you.
Basically, I want a simple SQL statement which queries my vehicle database. My fields and example data within the fields can be seen below:
"Make", "Model", "Price"
"Porsche", "911", 45000"
"Porsche", "911", 42000"
"Porsche", "911", 58000"
"Porsche", "911", 51000"
"Porsche", "911", 32000"
"Porsche", "911", 28000"
"Porsche", "911", 21000"
Basically, I want to display how many Porsches (or any other car) I have listed within my database by price brackets. So, the results on my page would look something like this:
Porsche Cars within 0 - 2000 price bracket: 0
Porsche Cars within 2001 - 5000 price bracket: 0
Porsche Cars within 5001 - 10000 price bracket: 0
Porsche Cars within 10001 - 15000 price bracket: 0
Porsche Cars within 15001 - 20000 price bracket: 0
Porsche Cars within 20001 - 30000 price bracket: 2
Porsche Cars within 30001 - 40000 price bracket: 1
Porsche Cars within 40001 - 50000 price bracket: 2
Porsche Cars within 50001 - 10000 price bracket: 2
Porsche Cars within 100000 + price bracket: 0
How would I do this and what would my statement look like? Any help would be fully appreciated
Best regards
Rod from the UK