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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER