Update page 'Useful SQL commands'

master
Rick Payton 7 年之前
父節點
當前提交
9c6ad5f2e6
共有 1 個文件被更改,包括 5 次插入1 次删除
  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 <

Loading…
取消
儲存