I have a situation. How can I extract AppId that has only taken C++. and no other course.
Sample data is shown below
AppID | Course
---------------
101 | C++
101 | Data Structure
100 | C++.
201 | Analysis of Alogrithm
201 | Data Structure
and so on
Here is the dummy SQL
DROP TABLE #app
CREATE TABLE #app (AppID int, Course nvarchar(50))
INSERT INTO #app
VALUES(101,'C++'),
(101 ,'Data Structure'),
(100 ,'C++'),
(201 ,'Analysis of Alogrithm'),
(201 ,'Data Structure')
Select AppId,Course From #app
I think this will work