While loop in sql

Hi. I have following task.
1) Find number of orders for the different shipping fee.
The result should be like:
ShippingFee:      OrderCount:
70                        150
90                         140

And so on.

I was thinking abount a while loop in sql, but donĀ“t know how:

while (select distinct shippingfee from orders)
select count(orderid) from orders where shippingfee = shippingfee
Can somebody help me?
Jesper ChristensenProgrammerAsked:
Who is Participating?
aflockhartConnect With a Mentor Commented:
FROM orders
GROUP BY shippingfee
Jesper ChristensenProgrammerAuthor Commented:
Nice :=)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.