--
-- ### Distinct operator checks
--

drop if exists table supplier;
create table supplier ( primary snr int not null, category string(10), sname string(30));

-- insert base data
insert into supplier values ( 1, 'A', 'Time&Material');
insert into supplier values ( 2, 'A', 'Cego AG');
insert into supplier values ( 3, 'A', 'Moon Factory');
insert into supplier values ( 4, 'B', 'McDagobert');
insert into supplier values ( 11, 'B','HAL');
insert into supplier values ( 111, 'B','HAL');
insert into supplier values ( 12, 'B','Abraxas');
insert into supplier values ( 13, 'B','ThunderStorm');

select sname from supplier;
select sname from supplier;
select sname from supplier;
select sname from supplier;
-- select sname from supplier order by snr asc;
-- select sname from supplier order by snr desc ; 

select distinct category from supplier;
select distinct category from supplier;
select distinct category, sname from supplier;
select distinct category, sname from supplier order by sname ;
select category, sname from supplier order by sname ;

select count( distinct category ) from supplier;
 
drop table supplier;


