Tables for Set Operations
drop table artist_american;
drop table artist_german;
drop table artist_italian;
drop table artist_spanish;
drop table artist_swiss;
drop table artist_french;
drop table artist_english;
drop table artist_russian;
drop table artist_dutch;
drop table artist_realist;
drop table artist_rococo;
drop table artist_expressionist;
drop table artist_marine;
drop table artist_portraitist;
drop table artist_romantic;
drop table artist_neoclassical;
drop table artist_post_impressionist;
drop table artist_hudson_river_school;
drop table artist_impressionist;
drop table artist_18th;
drop table artist_15th;
drop table artist_16th;
drop table artist_20th;
drop table artist_19th;
drop table artist_17th;
create table artist_american as select * from canvas.artist where nationality='American';
create table artist_german as select * from canvas.artist where nationality='German';
create table artist_italian as select * from canvas.artist where nationality='Italian';
create table artist_spanish as select * from canvas.artist where nationality='Spanish';
create table artist_swiss as select * from canvas.artist where nationality='Swiss';
create table artist_french as select * from canvas.artist where nationality='French';
create table artist_english as select * from canvas.artist where nationality='English';
create table artist_russian as select * from canvas.artist where nationality='Russian';
create table artist_dutch as select * from canvas.artist where nationality='Dutch';
create table artist_realist as select * from canvas.artist where style='Realist';
create table artist_rococo as select * from canvas.artist where style='Rococo';
create table artist_expressionist as select * from canvas.artist where style='Expressionist';
create table artist_marine as select * from canvas.artist where style='Marine';
create table artist_portraitist as select * from canvas.artist where style='Portraitist';
create table artist_romantic as select * from canvas.artist where style='Romantic';
create table artist_neoclassical as select * from canvas.artist where style='Neoclassical';
create table artist_post_impressionist as select * from canvas.artist where style='Post Impressionist';
create table artist_impressionist as select * from canvas.artist where style='Impressionist';
create table artist_hudson_river_school as select * from canvas.artist where style='Hudson River School';
create table artist_18th as select * from canvas.artist where trunc(death/100)+1 = 18;
create table artist_15th as select * from canvas.artist where trunc(death/100)+1 = 15;
create table artist_16th as select * from canvas.artist where trunc(death/100)+1 = 16;
create table artist_20th as select * from canvas.artist where trunc(death/100)+1 = 20;
create table artist_19th as select * from canvas.artist where trunc(death/100)+1 = 19;
create table artist_17th as select * from canvas.artist where trunc(death/100)+1 = 17;
grant select on artist_american to public;
grant select on artist_german to public;
grant select on artist_italian to public;
grant select on artist_spanish to public;
grant select on artist_swiss to public;
grant select on artist_french to public;
grant select on artist_english to public;
grant select on artist_russian to public;
grant select on artist_dutch to public;
grant select on artist_realist to public;
grant select on artist_rococo to public;
grant select on artist_expressionist to public;
grant select on artist_marine to public;
grant select on artist_portraitist to public;
grant select on artist_romantic to public;
grant select on artist_neoclassical to public;
grant select on artist_post_impressionist to public;
grant select on artist_hudson_river_school to public;
grant select on artist_impressionist to public;
grant select on artist_18th to public;
grant select on artist_15th to public;
grant select on artist_16th to public;
grant select on artist_20th to public;
grant select on artist_19th to public;
grant select on artist_17th to public;
------------------------------------------------------------
-- Show all information about artist who are --
-- French or Dutch --
------------------------------------------------------------
select * from artist_french
union
select * from artist_dutch;
------------------------------------------------------------
-- Show all information about artist who are --
-- Dutch or impressionists --
------------------------------------------------------------
select * from artist_dutch
union
select * from artist_impressionist;
------------------------------------------------------------
-- Show all information about artist who are --
-- Dutch impressionists --
------------------------------------------------------------
select * from artist_dutch
intersect
select * from artist_impressionist;
------------------------------------------------------------
-- Show all information about impressionists who are --
-- not French --
------------------------------------------------------------
select * from artist_impressionist
minus
select * from artist_french;
------------------------------------------------------------
-- Show all information about impressionists who are --
-- neither French nor American --
------------------------------------------------------------
select * from artist_impressionist
minus
select * from artist_french
minus
select * from artist_American;
------------------------------------------------------------
-- Show all information about 19th century --
-- impressionists who are neither French nor American --
------------------------------------------------------------
select * from artist_impressionist
intersect
select * from ARTIST_19TH
minus
select * from artist_french
minus
select * from artist_American;