diff --git a/main.rb b/main.rb index 1b1c227..93f6c7c 100644 --- a/main.rb +++ b/main.rb @@ -39,7 +39,7 @@ get '/' do SELECT COUNT(1) AS total, SUM(size) AS bytes - FROM (select size from downloads group by video_id) as x; + FROM (select MAX(size) AS size from downloads group by video_id) as x; ")[0] videos = ActiveRecord::Base.connection.execute("select count(1) AS total from videos;")[0]