Hi everyone,
Can someone please help me with my problem,
I really need to solve this...
I have a table Sales....
Product | Brand | Sales | Price_1| Price_2 | Price_3
---------------------------------------------------------
Milk | Alaska | 0 | 10 | 20 | 30
Milk | Alaska | 1 | 80 | 70 | 90
Milk | Alaska | 2 | 100 | 200 | 300
I need to get the minimum and maximum sales of each Product...
sales |
------
0 |
2 |
after that I need to put their prices as before and after as a row...
just like this
salesfor 0 sales for 2
bef Price | Aft Price
-------------------------
10 | 100 <-- Price 1
20 | 200 <-- Price 2
30 | 300 <-- Price 3
I want to have an output like this
Produt |Brand |MinSales |bef Price|MaxSales |Aft Price
-----------------------------------------------------
Milk |Alaska |0 | 10 |2 |100
Milk |Alaska |0 | 20 |2 |200
Milk |Alaska |0 | 30 |2 |300
Please help me with this problem
Thnk you so much in advance for anyhelp that you can do...
Can someone please help me with my problem,
I really need to solve this...
I have a table Sales....
Product | Brand | Sales | Price_1| Price_2 | Price_3
---------------------------------------------------------
Milk | Alaska | 0 | 10 | 20 | 30
Milk | Alaska | 1 | 80 | 70 | 90
Milk | Alaska | 2 | 100 | 200 | 300
I need to get the minimum and maximum sales of each Product...
sales |
------
0 |
2 |
after that I need to put their prices as before and after as a row...
just like this
salesfor 0 sales for 2
bef Price | Aft Price
-------------------------
10 | 100 <-- Price 1
20 | 200 <-- Price 2
30 | 300 <-- Price 3
I want to have an output like this
Produt |Brand |MinSales |bef Price|MaxSales |Aft Price
-----------------------------------------------------
Milk |Alaska |0 | 10 |2 |100
Milk |Alaska |0 | 20 |2 |200
Milk |Alaska |0 | 30 |2 |300
Please help me with this problem
Thnk you so much in advance for anyhelp that you can do...
Comment