Advertisement
ROMaster2

SQLOL

Feb 4th, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.65 KB | None | 0 0
  1. SELECT RunsMasterPE.LeaderboardID, RunsMasterPE.RunDate,
  2. (
  3. SELECT SUM(Testing1) AS Testing2
  4. FROM
  5. (
  6. SELECT MAX(IIf((1-2^((100-(RunsMasterPE.RunDate-RunsMasterPE2.RunDate))/30.4375))/(1-2^(100/30.4375))>0,(1-2^((100-(RunsMasterPE.RunDate-RunsMasterPE2.RunDate))/30.4375))/(1-2^(100/30.4375)),0)) AS Testing1
  7. FROM RunsMasterPE AS RunsMasterPE2
  8. WHERE RunsMasterPE.LeaderboardID = RunsMasterPE2.LeaderboardID AND (RunsMasterPE.RunDate-RunsMasterPE2.RunDate <= 100) AND (RunsMasterPE.RunDate-RunsMasterPE2.RunDate >= 0)
  9. GROUP BY RunsMasterPE2.LeaderboardID, RunsMasterPE2.UserID
  10. )
  11. )
  12. FROM RunsMasterPE
  13. GROUP BY RunsMasterPE.LeaderboardID, RunsMasterPE.RunDate;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement