From 9a2b51a01efe146322fe413228267ca35427269a Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Mon, 6 Aug 2018 16:22:45 -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 6b058fb..a66237e 100644 --- a/Useful-SQL-commands.md +++ b/Useful-SQL-commands.md @@ -2,4 +2,7 @@ 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; Get the maximum entered sub-title rank: -* SELECT MAX(strank) FROM gwsubtitles WHERE titlenameid = ?; \ No newline at end of file +* SELECT MAX(strank) FROM gwsubtitles WHERE titlenameid = ?; + +Select title ranks from an array: +* SELECT * FROM gwsubtitles WHERE titlenameid = 25 AND stnameid IN (4, 6, 9); (4 6 9 will be replaced by a ? mark) \ No newline at end of file