X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/204486e824f0d2050a6fffce548d7191651e68c5..34e3e51456774127d43408b7ab65c24f41373f62:/script/statistics diff --git a/script/statistics b/script/statistics index c5d401227..f20e70031 100755 --- a/script/statistics +++ b/script/statistics @@ -57,14 +57,14 @@ begin puts "Nodes#{day_count}#{week_count}#{month_count}" puts "" - + puts "

Top users editing over the past...

" puts "" puts "" - day_users = OldNode.where("timestamp > NOW() - '1 DAY'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count - week_users = OldNode.where("timestamp > NOW() - '7 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count - month_users = OldNode.where("timestamp > NOW() - '28 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count + day_users = OldNode.where("timestamp > NOW() - '1 DAY'::INTERVAL").joins(:changeset).order("count_all DESC").group(:user_id).count + week_users = OldNode.where("timestamp > NOW() - '7 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(60).group(:user_id).count + month_users = OldNode.where("timestamp > NOW() - '28 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(60).group(:user_id).count day_users.zip(week_users, month_users).each do |row| puts ""
DayWeekMonth