You are given a university placement database consisting of the following tables: departments, students, courses, enrollments, companies, interviews, and offers.
Each course may be completed by multiple students, and each student may complete multiple courses. A student may also appear in multiple interviews and may receive multiple job offers.
Write an SQL query to analyze the placement impact of courses, considering only students who completed the course.
For each course, retrieve the following information:
course_id: Unique ID of the course.
course_name: Name of the course.
domain: Domain/category of the course.
number_of_students_completed: Total number of distinct students who completed the course, i.e., completion_status = 'COMPLETED'.
placement_rate_among_completers: Percentage of those completed students who have received at least one job offer with offer_status = 'ACCEPTED'. This should be calculated as:
(number of distinct completers with at least one ACCEPTED offer / number_of_students_completed) * 100
Round the value to 2 decimal places.
Filtering Requirement:
Include only those courses where: number_of_students_completed >= 20
Ordering Requirement: The result set should be ordered by:
placement_rate_among_completers in descending order
number_of_students_completed in descending order
course_name in ascending (alphabetical) order
course_id in ascending order
Flipkart Grid 8.0 • Pending
Flipkart Grid 8.0 • Pending
Flipkart Grid 8.0 • Pending
Flipkart Grid 8.0 • Pending
Flipkart Grid 8.0 • Pending