Please use this link to download the Exercise 05 -DB Script: https://drive.googl
ID: 3731543 • Letter: P
Question
Please use this link to download the Exercise 05 -DB Script:
https://drive.google.com/drive/folders/1gfdFkHtUp-VVkhItKiVwkH9G70qP2hzA
Questions: Complete the following steps.
1. Use the provided script to create and populate a database. This is the same script from
Exercise 4.
2. Write a query to display the information listed below.
3. The query must use the NOT EXISTS construct.
4. The query must use a subquery in the WHERE clause.
5. The results must be sorted by the students’ names as displayed.
6. You must turn in a single, well formatted .sql file.
7. The solution must not reference the literal names, ids, row numbers, etc. It should work for
the current data and for future, unknown data.
Explanation / Answer
Please find the query below.
SELECT CONCAT([LName], ', ', [FName]) as STUDENT_NAME FROM [dbo].[Sudent]
WHERE NOT EXISTS (
SELECT * FROM [dbo].[StudentInSection]
WHERE [dbo].[Student].[StudentId] = [dbo].[StudentInSection].[StudentId])
ORDER BY STUDENT_NAME;