From 38d542a731f79dc8ce27fc2900d33367561bd5de Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Mon, 13 Aug 2018 00:50:26 -1000 Subject: [PATCH] Update page 'Useful SQL commands' --- Useful-SQL-commands.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Useful-SQL-commands.md b/Useful-SQL-commands.md index 741f93f..f3d8b93 100644 --- a/Useful-SQL-commands.md +++ b/Useful-SQL-commands.md @@ -14,4 +14,7 @@ Manually match profession colors with profession id * UPDATE gwchars INNER JOIN gwprofessions SET gwchars.profcolor = gwprofessions.profcolor WHERE gwchars.profid = `gwprofessions`.`profid`; Select account wide stats, with next rank in line: -* SELECT * FROM gwaccstats JOIN gwsubtitles ON gwaccstats.stnameid = gwsubtitles.titlenameid WHERE titlepoints < stpoints LIMIT 1; \ No newline at end of file +* SELECT * FROM gwaccstats JOIN gwsubtitles ON gwaccstats.stnameid = gwsubtitles.titlenameid WHERE titlepoints < stpoints LIMIT 1; + +Better select of account wide stats? +* SELECT * FROM gwaccstats JOIN gwsubtitles ON gwaccstats.titlenameid = gwsubtitles.titlenameid WHERE titlepoints > stpoints AND gwaccstats.titlenameid = 1; \ No newline at end of file