11 Learn SQL Sub Queries

preview_player
Показать описание
Tutorial on creating and using SQL Sub Queries. Regular sub query and correlated sub query. Examples of sub queries.
Рекомендации по теме
Комментарии
Автор

Very clear explanation and illustration 👍👍👍

kebincui
Автор

Using sub query, List the students who took OPS235 more than once. Show first name, last name and the number of times the student took the OPS235. Sort by highest number to lowest number?


SELECT firstname, lastname, COUNT(*),
FROM Students
GROUP BY coursedesc
Having COUNT(*) >= 1 AND Coursedesc IN (
SELECT Coursedesc
FROM Students
WHERE Coursedesc = ‘OPS235’))
ORDER BY Count(Coursedesc);
is my output correct please explain .

aleemdatoo