From 852a8f4ce43bfe068f7bf8b29316d6de9094ba44 Mon Sep 17 00:00:00 2001 From: Niraj <128296263+btrezzy@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:17:11 +0530 Subject: [PATCH 1/3] added SQL question Adding SQL quiz questions freeCodeCamp#17 --- src/data/sql-quiz.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/data/sql-quiz.ts b/src/data/sql-quiz.ts index e0e0b0430..a0f5ceae0 100644 --- a/src/data/sql-quiz.ts +++ b/src/data/sql-quiz.ts @@ -752,6 +752,16 @@ const sqlQuiz = [ Explanation: "CHAR holds a fixed length string (up to 255 characters), while VARCHAR and TEXT hold variable length strings.", Link: "https://www.freecodecamp.org/news/sql-data-types-mysql/" + }, + { + Question: "In SQL, which of the following LIKE operator finds any values that have "or" at any position?", + Answer: "%or%", + Distractor1: "__r%", + Distractor2: "a__%", + Distractor3: "or%", + Explanation: + "The SQL LIKE operator with "%or%" matches any values containing "or" at any position within the string.", + Link: "https://youtu.be/-fW2X7fh7Yg?t=5881/" } ]; From 882518de245a0530f011585d9312b0dad660912f Mon Sep 17 00:00:00 2001 From: Niraj <128296263+btrezzy@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:32:49 +0530 Subject: [PATCH 2/3] Corrected code --- src/data/sql-quiz.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/sql-quiz.ts b/src/data/sql-quiz.ts index a0f5ceae0..04c2388ee 100644 --- a/src/data/sql-quiz.ts +++ b/src/data/sql-quiz.ts @@ -754,13 +754,13 @@ const sqlQuiz = [ Link: "https://www.freecodecamp.org/news/sql-data-types-mysql/" }, { - Question: "In SQL, which of the following LIKE operator finds any values that have "or" at any position?", + Question: "In SQL, which of the following LIKE operator finds any values that have 'or' at any position?", Answer: "%or%", Distractor1: "__r%", Distractor2: "a__%", Distractor3: "or%", Explanation: - "The SQL LIKE operator with "%or%" matches any values containing "or" at any position within the string.", + "The SQL LIKE operator with '%or%' matches any values containing 'or' at any position within the string.", Link: "https://youtu.be/-fW2X7fh7Yg?t=5881/" } ]; From 042f74cb46d4947786141fd0ae5725e5d8466e95 Mon Sep 17 00:00:00 2001 From: Niraj <128296263+btrezzy@users.noreply.github.com> Date: Sun, 1 Oct 2023 08:53:33 +0530 Subject: [PATCH 3/3] changes made --- src/data/sql-quiz.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/sql-quiz.ts b/src/data/sql-quiz.ts index 04c2388ee..ab01ff095 100644 --- a/src/data/sql-quiz.ts +++ b/src/data/sql-quiz.ts @@ -754,7 +754,7 @@ const sqlQuiz = [ Link: "https://www.freecodecamp.org/news/sql-data-types-mysql/" }, { - Question: "In SQL, which of the following LIKE operator finds any values that have 'or' at any position?", + Question: "In SQL, which of the following wildcards combined with the LIKE operator finds any value that has 'or' at any position?", Answer: "%or%", Distractor1: "__r%", Distractor2: "a__%",