drop table sales cascade; drop table item cascade; drop table store cascade; create table store ( code integer primary key, name text not null ); insert into store values(1, '新宿店'); insert into store values(2, '渋谷店'); insert into store values(3, '池袋店'); create table item ( code integer primary key, name text not null, price integer not null check(price > 0) ); insert into item values(1, 'コカコーラ', 95); insert into item values(2, 'Mサイダー', 88); insert into item values(3, 'CCレモン', 90); create table sales ( s_code integer references store(code), i_code integer references item(code), num integer ); insert into sales values(1, 1, 15); insert into sales values(1, 2, 8); insert into sales values(2, 2, 11); insert into sales values(2, 3, 7); insert into sales values(3, 1, 10); insert into sales values(3, 3, 9);