Adding player deck export sql script. Adding format over time sql script.
This commit is contained in:
10
gemp-lotr/db/export-player-decks.sql
Normal file
10
gemp-lotr/db/export-player-decks.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
SELECT
|
||||
p.name AS player_name
|
||||
,d.name AS deck_name
|
||||
,CONCAT('https://play.lotrtcgpc.net/share/deck?id=', TO_BASE64(CONCAT(p.name, '|', d.name))) AS deck_URL
|
||||
FROM gemp_db.deck d
|
||||
INNER JOIN player p
|
||||
ON p.id = d.player_id
|
||||
WHERE p.name = 'met'
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ INNER JOIN league_participation lp
|
||||
INNER JOIN league_match lm
|
||||
ON lm.league_type = l.`type`
|
||||
WHERE (lm.winner = lp.player_name OR lm.loser = lp.player_name )
|
||||
AND l.id = 545
|
||||
AND l.id = 554
|
||||
GROUP BY lp.player_name
|
||||
ORDER BY Count(*) DESC;
|
||||
|
||||
|
||||
9
gemp-lotr/db/get-game-time-stats.sql
Normal file
9
gemp-lotr/db/get-game-time-stats.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
SELECT
|
||||
format_name
|
||||
,YEAR(from_unixtime(end_date/1000)) AS Year
|
||||
,MONTH(from_unixtime(end_date/1000)) AS Month
|
||||
,from_unixtime(end_date/1000) AS PlayDate
|
||||
,COUNT(*)
|
||||
#*
|
||||
FROM game_history gh
|
||||
GROUP BY YEAR(from_unixtime(end_date/1000)), MONTH(from_unixtime(end_date/1000)), format_name
|
||||
Reference in New Issue
Block a user