DoNe does data analysis
Forum rules
Please consider wheter there is a more appropiate subforum before creating a new thread here.
This is for offical DDRaceNetwork-related information and discussion only.
Please consider wheter there is a more appropiate subforum before creating a new thread here.
This is for offical DDRaceNetwork-related information and discussion only.
Re: DoNe does data analysis
Ah sad news, so maybe you know how can get the mostly "last week/month points" with mysql? I asked for this in viewtopic.php?p=68411&sid=0c169f82cb9cf ... f5b#p68411 but its with python script.
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: DoNe does data analysis
I have given it a quick try, here you go:
Code: Select all
select sum(Points) from (select Points from record_race inner join record_maps on record_race.Map = record_maps.Map where Name = "murpi" group by record_race.Map having min(record_race.Timestamp) >= NOW() - INTERVAL 1 WEEK) as m;
select sum(Points) from (select Points from record_race inner join record_maps on record_race.Map = record_maps.Map where Name = "murpi" group by record_race.Map having min(record_race.Timestamp) >= NOW() - INTERVAL 1 MONTH) as m;
Re: DoNe does data analysis
wow cool, is there possible to get top10 last week points with name and points ?deen wrote: ↑Tue Jul 07, 2020 10:45 pm I have given it a quick try, here you go:Code: Select all
select sum(Points) from (select Points from record_race inner join record_maps on record_race.Map = record_maps.Map where Name = "murpi" group by record_race.Map having min(record_race.Timestamp) >= NOW() - INTERVAL 1 WEEK) as m; select sum(Points) from (select Points from record_race inner join record_maps on record_race.Map = record_maps.Map where Name = "murpi" group by record_race.Map having min(record_race.Timestamp) >= NOW() - INTERVAL 1 MONTH) as m;
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: DoNe does data analysis
Untested, but it probably takes forever:
Code: Select all
select Name, sum(Points) from (select record_race.Name, Points from record_race inner join record_maps on record_race.Map = record_maps.Map group by record_race.Map, record_race.Name having min(record_race.Timestamp) >= NOW() - INTERVAL 1 WEEK) as m group by Name order by sum(Points) desc limit 10;
Re: DoNe does data analysis
Thanks, worked fine.deen wrote: ↑Wed Jul 08, 2020 7:56 am Untested, but it probably takes forever:
Code: Select all
select Name, sum(Points) from (select record_race.Name, Points from record_race inner join record_maps on record_race.Map = record_maps.Map group by record_race.Map, record_race.Name having min(record_race.Timestamp) >= NOW() - INTERVAL 1 WEEK) as m group by Name order by sum(Points) desc limit 10;
Who is online
Users browsing this forum: Bing [Bot] and 4 guests