diff --git a/Useful-SQL-commands.md b/Useful-SQL-commands.md index 1b71b2e..6b058fb 100644 --- a/Useful-SQL-commands.md +++ b/Useful-SQL-commands.md @@ -1,2 +1,5 @@ View which titles have at least 1 rank applied to it: -* SELECT gwtitles.titlename FROM gwtitles WHERE titlenameid IN (SELECT titlenameid FROM gwsubtitles) ORDER BY titlename ASC; \ No newline at end of file +* SELECT gwtitles.titlename FROM gwtitles WHERE titlenameid IN (SELECT titlenameid FROM gwsubtitles) ORDER BY titlename ASC; + +Get the maximum entered sub-title rank: +* SELECT MAX(strank) FROM gwsubtitles WHERE titlenameid = ?; \ No newline at end of file