Consultas A DB Nortwind Mas

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

1- Mostrar el ID en una columna llamada cdigo, FirsrName y LastName como Nombres y apellidos de la tabla Employees Select EmployeeID as "Codigo",

FirstName + ' ' + LastName as "Nombre y Apellido" from Employees 2.- Mostrar la lista de precios con codigo del producto, nombre del producto, pr ecio de costo y precio de venta que ser el costo mas el 10% Select ProductID as "Codigo", ProductName as "Producto", UnitPrice as "Costo", U nitPrice+UnitPrice*0.1 as "Precio de venta" from Products 3.- de mayor a menor Select ProductID as "Codigo", ProductName as "Producto", UnitPrice as "Costo", U nitPrice+UnitPrice*0.1 as "Precio de venta" from Products Order By UnitPrice ASC 4.- de menor a mayor Select ProductID as "Codigo", ProductName as "Producto", UnitPrice as "Costo", U nitPrice+UnitPrice*0.1 as "Precio de venta" from Products Order By UnitPrice DES C 5.- ordenado alfabeticamente por pais select CompanyName as "compaa", Country as "Pais" from customers Order By Country ASC 6.- ordenado alfabeticamente por pais solo brasil o venezuela select CompanyName as "compaa", Country as "Pais" from customers where country='ve nezuela' or Country='Brazil' Order By Country ASC 7.- Muestra el listado de las compaas ordenadas alfabeticamente ubicadas en Aleman ia y cuyo contacto sea Sales Representative Select CompanyName as "Compaia", Country as "Pais", ContactTitle as "Contacto" fr om Customers where country='germany' and contacttitle='Sales Representative' order by CompanyName 8.- Listar las ventas del ao 1998 ordenado por id de cliente select * from orders where year(orderdate)=1998 order by CustomerID 9.- Mostrar las ventas realizadas entre el 01/01/1998 y el 31/12/1998 select * from orders where orderdate >= '01/01/1998' and orderdate <= '31/12/199 8' 10.-

You might also like