Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language
WITH Raw AS ( SELECT FLOOR( POWER(##LogBase:float?1.5##, FLOOR( LOG(0.1 * Users.Reputation) / LOG(##LogBase##) ) ) ) AS Rep, Posts.Score AS Score FROM Posts, Users WHERE Posts.OwnerUserId = Users.Id AND Posts.PostTypeId = 2 ) SELECT 10 * Rep, AVG(1.0 * Score) AS AvgScore FROM Raw WHERE (##MaxRep:int?20000## = 0 OR Rep <= ##MaxRep##) GROUP BY Rep ORDER BY Rep