parent
8502b302b2
commit
a831810487
12 changed files with 321 additions and 148 deletions
@ -0,0 +1,67 @@ |
||||
--- |
||||
title: Quiz 1 |
||||
description: Test your knowledge of SQL queries with this quiz. |
||||
order: 200 |
||||
type: quiz |
||||
questions: |
||||
- id: 1 |
||||
title: 'Which of the following SQL clauses is used to filter results after the GROUP BY clause?' |
||||
options: |
||||
- id: 1 |
||||
text: 'WHERE' |
||||
- id: 2 |
||||
text: 'HAVING' |
||||
isCorrectOption: true |
||||
- id: 3 |
||||
text: 'GROUP BY' |
||||
- id: 4 |
||||
text: 'ORDER BY' |
||||
- id: 2 |
||||
title: 'Which SQL function is used to return the first non-null expression?' |
||||
options: |
||||
- id: 1 |
||||
text: 'COALESCE' |
||||
isCorrectOption: true |
||||
- id: 2 |
||||
text: 'IFNULL' |
||||
- id: 3 |
||||
text: 'NULLIF' |
||||
- id: 4 |
||||
text: 'NVL' |
||||
- id: 3 |
||||
title: 'What is the purpose of an SQL CTE (Common Table Expression)?' |
||||
options: |
||||
- id: 1 |
||||
text: 'To create temporary tables that last for the duration of a query' |
||||
isCorrectOption: true |
||||
- id: 2 |
||||
text: 'To define reusable views' |
||||
- id: 3 |
||||
text: 'To encapsulate subqueries' |
||||
- id: 4 |
||||
text: 'To optimize the execution of queries' |
||||
- id: 4 |
||||
title: 'In an SQL window function, which clause defines the subset of rows to apply the function on?' |
||||
options: |
||||
- id: 1 |
||||
text: 'ORDER BY' |
||||
- id: 2 |
||||
text: 'PARTITION BY' |
||||
isCorrectOption: true |
||||
- id: 3 |
||||
text: 'GROUP BY' |
||||
- id: 4 |
||||
text: 'DISTINCT' |
||||
- id: 5 |
||||
title: 'Which SQL join returns all rows when there is a match in either of the tables?' |
||||
options: |
||||
- id: 1 |
||||
text: 'INNER JOIN' |
||||
- id: 2 |
||||
text: 'LEFT JOIN' |
||||
- id: 3 |
||||
text: 'RIGHT JOIN' |
||||
- id: 4 |
||||
text: 'FULL OUTER JOIN' |
||||
isCorrectOption: true |
||||
--- |
@ -1,27 +0,0 @@ |
||||
--- |
||||
import { ChallengeView } from '../../components/Course/ChallengeView'; |
||||
import type { ChallengeFileType } from '../../lib/course'; |
||||
import { getCourseById, getCourseExerciseById } from '../../lib/course'; |
||||
|
||||
const course = await getCourseById('sql'); |
||||
|
||||
const exercise = (await getCourseExerciseById( |
||||
'sql', |
||||
'introduction', |
||||
'challenge-1', |
||||
)) as ChallengeFileType; |
||||
--- |
||||
|
||||
<ChallengeView |
||||
title={exercise.frontmatter.title} |
||||
chapters={course.chapters} |
||||
completedPercentage={0} |
||||
defaultValue={exercise.frontmatter.defaultValue} |
||||
expectedResults={exercise.frontmatter.expectedResults} |
||||
initSteps={exercise.frontmatter.initSteps} |
||||
client:load |
||||
> |
||||
<div class='prose prose-xl prose-invert'> |
||||
<exercise.Content /> |
||||
</div> |
||||
</ChallengeView> |
Loading…
Reference in new issue