Link to home
Start Free TrialLog in
Avatar of Jesper Christensen
Jesper Christensen

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of aflockhart
aflockhart
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jesper Christensen
Jesper Christensen

ASKER

Nice :=)