Mario

Preview:

Citation preview

Trabajo sql

1.2 select nombre_estrellafrom protagoniza where año_pelicula=`1980`or titulo_pelicula like `amor`

1.4 select duracion as duracion_pelifrom peliculawhere titulo = `lo que el viento se llevo`select titulofrom peliculawhere duracion_peli < pelicula.duracion

1.5 select titulo, duracionfrom peliculawhere nombre_estudio=`Disney`

and año=`1990`order by duracion

1.6 select nombre from estrella where sexo = `masculino`and direccion like `malibu`

1.7 select estrella.nombrefrom estrella, peliculawhere nombre_estudio like `mgm`

and pelicula.año = `1995`group by estrella.nombre

1.8 select sum (duracion)as suma_duracionfrom peliculagroup by nombre_estudio

2.1 selectpc.modelo, pc.velocidad, pc.hd

from pcwhere precio < 1600000

2.2 select pc.modelo, pc.velocidad, pc.hdfrom pcwhere velocidad=`megaherzios`

and hd=`gigabytes`and precio < 1600000

2.3 select *from impresorawhere color=`true`

2.4 select avg(velocidad)from pc

2.5 select producto.fabricante, pc.velocidadfrom producto, pcwhere pc.hd >=`1 `

2.6 select producto.fabricantefrom productowhere pc.velocidad > `1600

mhz`

3.1 selectvive.nombre, vive.ciudad

from vive, trabajawhere compañía= `la corte inglesa`

3.2 select vive.nombrefrom vive, situadawhere vive.ciudad = situada.ciudad

3.3 select trabaja.salario, trabaja.compañiafrom trabaja, dirigewhere trabaja.nomre = dirige.nombre

4.1 select cigarrillo.marcafrom cigarrillo, fabricantewhere fabricante.pais!=`colombia`

4.3 Select avg(compras.precio/ventas.pre

cio)from compras, ventas

4.4 select estanco.nombrefrom estanco, ventaswhere

ventas.marca!=`ducados`and ventas.filtro!=`con filtro`