This one measures Moore's law effects.

Nov 19, 2008 22:58

SELECT AVG(DateDiff(LateTime,EarlyTime)), AVG((LatePrice-EarlyPrice)/EarlyPrice) FROM
(SELECT td1.Price AS LatePrice, td1.EndTime AS LateTime, td2.Price AS EarlyPrice, td2.EndTime AS EarlyTime From
training_data td1,
training_data td2,
(SELECT Brand, Family, Series, MAX(TrainingID) AS MaxID, MIN(TrainingID) AS MinID, MAX(EndTime) AS MaxTime, MIN(EndTime) AS MinTime,
MAX(Price) AS MaxP, AVG( Price ) AS AvP, MIN(Price) AS MinP, STDDEV(Price) AS Stddev, Count(ItemID) AS cnt
FROM training_data
WHERE LENGTH(Series) > 0 AND Series != "XP"
GROUP BY Brand, Family, Series, CPUType, CPUCores, CPUSpeed, RAM, HDD, LCD, OS, Drive, ItemCondition
HAVING (Count(ItemID) > 1)) AS stats
WHERE td1.TrainingID = MaxID AND td2.TrainingID = MinID) AS DateStats

Results:
AVG(DateDiff(LateTime,EarlyTime)) AVG((LatePrice-EarlyPrice)/EarlyPrice)
19.6273 -0.024479912696576

Or, in human language, if I made no mistakes in SQL,
Laptop prices drop 2.5% every 20 days.

casino, dev

Previous post Next post
Up