Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

pa help po sa mga sql master :)

chachi

Novice
Advanced Member
Messages
23
Reaction score
0
Points
26
sir panu ko po macoconvert to =FORECAST(25,O6:Z6,O$3:Z$3) as query


View attachment 307562

eto po ung sample query ko

--LR
select avg(x)*25 from (
select s.partno, SUM(s.LR_X)as X,sum(LR_Y * 1)as y from (
select xf.partno,xf.LR_Y,LR_X= ROW_NUMBER() over (order by xf.LR_Y)
from (
select value as LR_Y,partno
from (
select *
from (
select partno,month13,month14,month15,month16,month17,month18,month19,month20,month21,month22,month23,month24
from #Forecast_total where partno='00232 CH200' )t
unpivot (
value for n in(month13,month14,month15,month16,month17,month18,month19,month20,month21,month22,month23,month24 ))p
)x
)xf
)s
group by s.partno
)x


thank you po
 

Attachments

  • forcast.png
    forcast.png
    10.7 KB · Views: 9
select partno,x_,y_ from (
select partno,avg(x*1.0)as x_,AVG(Y*1.0)as y_ from (
select xf.partno,xf.Y, 12 + ROW_NUMBER() over (order by xf.Y)X
from (
select value as Y,partno
from (
select *
from (
select partno,month13,month14,month15,month16,month17,month18,month19,month20,month21,month22,month23,month24
from #Forecast_total where partno='00232 CH200' )t
unpivot (
value for n in(month13,month14,month15,month16,month17,month18,month19,month20,month21,month22,month23,month24 ))p
)x
)xf
)x group by partno
)f



ouput

partno x_ y_
00232 CH200 18.500000 210

problem ko nalang po sir ung LR naaverage ko na po
 
Last edited:
Back
Top Bottom