drop view sales_v; create view sales_v as select st.name as X, it.name as i, sa.num as ̔, it.price * sa.num as z from store st cross join item it left join sales sa on (st.code, it.code) = (sa.s_code, sa.i_code) order by st.code, it.code ;