mardi 5 mai 2015

How to get this sql query: show records by amount

I want to display amount of sales from a table in this format:

Sales             qty
------------------------------------------
Sales > 50,000    500
Sales < 2000      200
Sales > 15,000    600
------------------------------------------

How can I create this ? I can write a query for one amount where > 50000 but in this case there is three 50,000 , 2000, 15,000 and how can I show all this in the result?

Aucun commentaire:

Enregistrer un commentaire