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