drop view sales_t_v; create view sales_t_v as select sum(it.price * sa.num) as vz from sales sa join store st on sa.s_code = st.code join item it on sa.i_code = it.code ;