Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Help in the query of Grouping

$
0
0

Hi, Every travel_agenecy should have 'Economy' class. I want to find the  name of 'travel_agenecy' from query which has not 'Economy' Class.

create table #Travel (travel_agency char(4), travel_class char(4))

insert into #Travel ('Perth','Business')

insert into #Travel ('Perth','Economy')

insert into #Travel ('Perth','VIP')

insert into #Travel ('Ford','Business')

insert into #Travel ('Ford','Economy')

insert into #Travel ('Sidney','Business')

insert into #Travel ('Sidney','VIP')

insert into #Travel ('Sudhath','Business')

--expected results which has no 'Economy Class'

travel_agency

-----------------

Sidney

Sudhath


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>