Update page 'Useful SQL commands'

master
Rick Payton 7 anni fa
parent
commit
9c6ad5f2e6
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +5
    -1
      Useful-SQL-commands.md

+ 5
- 1
Useful-SQL-commands.md

@@ -17,4 +17,8 @@ Select account wide stats, with next rank in line:
* 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;
* SELECT * FROM gwaccstats JOIN gwsubtitles ON gwaccstats.titlenameid = gwsubtitles.titlenameid WHERE titlepoints > stpoints AND gwaccstats.titlenameid = 1;
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 <

Caricamento…
Annulla
Salva