Q&A about the site for serious players and enthusiasts of chess
-- Happiness is proportional to % of votes that were upvotes. DECLARE @S float SELECT @S = (1.0*SUM(IIF(VoteTypeId=2,1,0))/COUNT(*)-0.85)/0.15 FROM Votes WHERE VoteTypeId IN (2,3) SELECT TOP 360 COS(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) x, '', SIN(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) y FROM PostHistory UNION ALL SELECT x,' ',(y+0.45)*@S-0.45 FROM (SELECT TOP 120 0.7*COS((30 + ROW_NUMBER() OVER (ORDER BY Id)) * 3.1415927 / 180.0) x, -0.7*SIN((30 + ROW_NUMBER() OVER (ORDER BY Id)) * 3.1415927 / 180.0) y FROM PostHistory) f UNION ALL SELECT TOP 360 0.15*COS(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) - 0.35 x, ' ', 0.15*SIN(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) + 0.35 y FROM PostHistory UNION ALL SELECT TOP 360 0.15*COS(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) + 0.35 x, ' ', 0.15*SIN(ROW_NUMBER() OVER (ORDER BY Id) * 3.1415927 / 180.0) + 0.35 y FROM PostHistory UNION ALL SELECT -2.5, ' ', 0 UNION ALL SELECT 2.5, ' ', 0