Practica 6 Realizar las siguientes consultas en la base de datos Pubs. 1. Todos los ttulos con sus respectivos autores (title_id,au_lname,au_fname,title) 2. Obtener las ventas con su respectiva tienda, y que la venta se hayan realizado entre el ao 1992 y 1994, y que el precio del ttulo sea mayor que 20 (title,ord_date,price) 3. Insertar un registro en Sales. 4. Obtener los ttulos que tengan el siguiente tipo: business y popular_comp, y que no tengan precio (type, title, title_id, price) 5. Mostrar todas las tiendas con sus ventas. 6. Insertar un registro en Authors.
from titles, titleauthor, authors where titles.title_id=titleauthor.title_id and titleauthor.au_id=authors.au_id select title,ord_date,price from titles, sales where titles.title_id=sales.title_id and (ord_date between '19920101' and '19941231') and price > 20 select * from sales select * from titles select * from stores
select titles.type, title, title_id, price from titles where (titles.type='business' or titles.type='popular_comp') and price is NULL select stor_id, stor_name, stor_address, city, state, zip from stores select * from titleauthor select * from authors sp_help authors insert authors values('000-00-0000', 'perez', 'juan', '235 235-4561', 'satelite ', 'mexico', 'me', '65321', 3)