Mario

21
Trabajo sql

Transcript of Mario

Page 1: Mario

Trabajo sql

Page 2: Mario
Page 3: Mario

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

Page 4: Mario
Page 5: Mario

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

Page 6: Mario

1.5 select titulo, duracionfrom peliculawhere nombre_estudio=`Disney`

and año=`1990`order by duracion

Page 7: Mario

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

Page 8: Mario

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

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

Page 9: Mario

1.8 select sum (duracion)as suma_duracionfrom peliculagroup by nombre_estudio

Page 10: Mario

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

from pcwhere precio < 1600000

Page 11: Mario

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

and hd=`gigabytes`and precio < 1600000

Page 12: Mario

2.3 select *from impresorawhere color=`true`

Page 13: Mario

2.4 select avg(velocidad)from pc

Page 14: Mario

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

Page 15: Mario

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

mhz`

Page 16: Mario

3.1 selectvive.nombre, vive.ciudad

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

Page 17: Mario

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

Page 18: Mario

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

Page 19: Mario

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

Page 20: Mario

4.3 Select avg(compras.precio/ventas.pre

cio)from compras, ventas

Page 21: Mario

4.4 select estanco.nombrefrom estanco, ventaswhere

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