From a5cf52c78721e0c725ad7f2d1944f5ac58d04742 Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Fri, 17 Aug 2018 15:32:15 -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 fb550d8..ef92f23 100644 --- a/Useful-SQL-commands.md +++ b/Useful-SQL-commands.md @@ -21,4 +21,7 @@ Better select of account wide stats? Get maxed out account titles first, sorted by rank, THEN by percentage over max rank: * SELECT * FROM gwaccstats WHERE userid = ? AND accid = ? AND percent > 100 ORDER BY currentstrank DESC, percent DESC; -* to get the unmaxed account titles sorted, just flip the > to < \ No newline at end of file +* to get the unmaxed account titles sorted, just flip the > to < + +count maxed out titles from characters and accounts +* Character: SELECT COUNT(****) FROM gwcharstats WHERE percent >= 100 AND titlenameid != 27 AND charid = 20; \ No newline at end of file