Use Adventureworks2012.docx

  • Uploaded by: gerlen zorilla
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Use Adventureworks2012.docx as PDF for free.

More details

  • Words: 485
  • Pages: 5
-- Elabore un query que liste los clientes junto con, ID numbers. Incluir el StoreID y el AccountNumber utilizando la tabla sales.Customer.

use AdventureWorks2012; select storeID,ACCOUNTNUMBER FROM [Sales].[Customer]

--Elabore un query que liste el name, product numer y color de cada producto utilizando la tabla, production.product

use AdventureWorks2012; SELECT NAME, ProductNumber, Color FROM [Production].[Product]

3. Elabore un query que liste el custumer ID y el Order ID de la tabla sales.salesOrderHeader

use AdventureWorks2012; SELECT AccountNumber , ORDERDATE FROM[Sales].[SalesOrderHeader]

. Utilizando la tabla [HumanResources].[Department] listar el GroupName sin que se repita el valor, solo presentarlo 1 vez

use AdventureWorks2012; SELECT DISTINCT GROUPNAME FROM [HumanResources].[Department]

Utilizando la tabla [HumanResources].[Department] traer todos los registro donde DepartmentID sea mayor o igual 25 use AdventureWorks2012; SELECT * FROM [HumanResources].[Department]

where DepartmentID >= 25

12. Utilizando la tabla [HumanResources].[Department] traer todos los registro donde DepartmentID igual a 4 use AdventureWorks2012; SELECT * FROM [HumanResources].[Department] where DepartmentID = 4

11. Utilizando la tabla [HumanResources].[Department] traer todos los registro donde DepartmentID sea diferente a 16 use AdventureWorks2012; SELECT * FROM [HumanResources].[Department] where DepartmentID != 16

10. Utilizando la tabla [HumanResources].[Department] traer todos los registro donde DepartmentID sea menor o igual 100 use AdventureWorks2012; SELECT * FROM [HumanResources].[Department] where DepartmentID <= 100

6. Elabore un query que me permita identificar el BusinessEntityID, NationalIDNumber, BirthDate y Gender de los Database Administrator utilizando la tabla [HumanResources].[Employee] use AdventureWorks2012; SELECT BusinessEntityID, NationalIDNumber, BirthDate, Gender FROM [HumanResources].[Employee]

7.Elabore un query que me retorne los primeros 5 registros de la tabla sales.salesOrderHeader y me l ordene por TotalDue de forma Descendente, mostra los campos: salesOrderID, OrderDate, SalesOrderNumber,TotalDue use AdventureWorks2012; SELECT top (5) SalesOrderID, OrderDate, SalesOrderNumber, TotalDue FROM [sales].[SalesOrderHeader] order by TotalDue desc

utilizando la tabla sales.salesOrderDetail realizar una consulta de todos los registro que esten entre '2007/1/5' y '2007/31/12'y que adicional su productid sea mayor o igual a 809 use AdventureWorks2012; SELECT OrderQty, ProductID, ModifiedDate, SalesOrderDetailID from [Sales].[SalesOrderDetail] where ModifiedDate between '2007/1/5'and '2007/31/12'and ProductID = 809

15.utilizando la tabla sales.salesOrderDetail realizar una consulta de todos los registro donde su productID este en 776,778,747,809 use AdventureWorks2012; SELECT * FROM[Sales].[SalesOrderDetail] where ProductID in (776, 778,747,809)

16.utilizando la tabla HumanResources.Department seleccione todos los campos de la misma donde los nombres comiencen con la letra 'pr' USE AdventureWorks2012; SELECT * FROM[HumanResources].[Department] where name like 'pr%'

8.Utilizando la tabla [HumanResources].[Department] listar los campos DeparmentID como NumeroDepartamento,name como NombreDepartamento y GroupName como NombreGrupoDepartamento

use AdventureWorks2012; SELECT DepartmentID as numerodepartamento, name as nombredepartamento, groupname as nombregrupodepartamento FROM [HumanResources].[department]

14. utilizando la tabla sales.salesOrderDetail realizar una consulta de todos los registro que esten entre '2007/1/5' y '2007/31/12'y que adicional su productid sea mayor o igual a 809 use AdventureWorks2012; SELECT OrderQty, ProductID, ModifiedDate, SalesOrderDetailID from [Sales].[SalesOrderDetail] where ModifiedDate between '2007-5-1 'and '2007-12-31' and ProductID = 809

13. Utilizando la tabla sales.salesOrderHeader realizar una consulta de todos los registros cuya orderDate esté entre '2007/1/5' y '2007/31/12' use AdventureWorks2012; SELECT * from [Sales].[SalesOrderHeader] where OrderDate between '2007-5-1 'and '2007-12-31'

Related Documents

Use
December 2019 13
How To Use Use Cases
May 2020 31
Deb Use
November 2019 8
Use Case
May 2020 11
Drug Use
May 2020 5

More Documents from "isa_diogo8170"

Ejercicio 2 (1).txt
December 2019 11
Ejercicio 2.txt
December 2019 11
Ejercicio 2 (2).txt
December 2019 16
December 2019 14
December 2019 10
Use Adventureworks2012.docx
December 2019 10