1 |
You can tweak endlessly what you report. You want number of battles where person left before 95% of battle time? Here you are:
|
1 |
You can tweak endlessly what you report. You want number of battles where person left before 95% of battle time? Here you are:
|
2 |
\n
|
2 |
\n
|
3 |
[quote]
|
3 |
{
{
{
select
COUNT(
*)
as
"Battle
count",
|
4 |
select COUNT(*) as "Battle count",
|
|
|
5 |
AVG(b.duration_sec/60) as "Average duration(min)",
|
4 |
AVG(b.duration_sec/60) as "Average duration(min)",
|
6 |
AVG(bp.playtime_sec/60) as "Average playtime(min)",
|
5 |
AVG(bp.playtime_sec/60) as "Average playtime(min)",
|
7 |
AVG(CAST(bp.playtime_sec as float)/b.duration_sec) as "Average relative played time",
|
6 |
AVG(CAST(bp.playtime_sec as float)/b.duration_sec) as "Average relative played time",
|
8 |
CAST(SUM(CAST(bp.playtime_sec as float)/b.duration_sec<0.95) as float)/COUNT(*)
|
7 |
CAST(SUM(CAST(bp.playtime_sec as float)/b.duration_sec<0.95) as float)/COUNT(*)
|
9 |
from battle_player bp inner join battles b on bp.battle_id=b.battle_id where player_id = 5295
|
8 |
from battle_player bp inner join battles b on bp.battle_id=b.battle_id where player_id = 5295
|
10 |
AND b.duration_sec>60 AND b.title LIKE "%Teams All Welcome";
|
9 |
AND b.duration_sec>60 AND b.title LIKE "%Teams All Welcome";
|
11 |
[/quote]
|
10 |
}
}
}
|
12 |
\n
|
11 |
\n
|
13 |
@rollmops: I am jealous on your formatted code, how do you achieve that? (tried quote/spoiler, but don't seem to do what I want)
|
12 |
@rollmops: I am jealous on your formatted code, how do you achieve that? (tried quote/spoiler, but don't seem to do what I want)
|
|
|
13 |
\n
|
|
|
14 |
Edit: now with formatting.
|