SQL Quiz & Exercises πΒΆ
Prerequisites: Modules 1-9
Mentor's Note: Reading is good, but doing is better. Try to solve these problems without looking at the reference hub. If you can solve all 5, you are ready for your college exams! π‘
π Part 1: Multiple ChoiceΒΆ
Q1. Which clause is used to filter groups after they have been aggregated?ΒΆ
- A) WHERE
- B) ORDER BY
- C) HAVING
- D) DISTINCT
Q2. What is the result of 10 + NULL in SQL?ΒΆ
- A) 10
- B) 0
- C) Error
- D) NULL
π» Part 2: Practical ChallengesΒΆ
Challenge 1: The High Rollers π°ΒΆ
Problem: Find all employees who earn more than βΉ60,000 and sort them by name alphabetically.
Challenge 2: The Missing Email π§ΒΆ
Problem: Count how many students have not provided an email address.
Challenge 3: The Multi-Table Match πΈοΈΒΆ
Problem: Show the emp_name and the dept_name for every employee using an INNER JOIN.
View Solution
π Self-AssessmentΒΆ
- 0-2 Correct: Go back to Foundations. πΆ
- 3-4 Correct: Good progress! Review Joins. π§
- 5 Correct: SQL Master! Move to PL/SQL. π
π‘ Pro Tip: "Consistency is what transforms average into excellence. Practice one query every day!"