sql lab @ home 2 | SQL LAB @ HOME
SQL LAB @ HOME
search
Classic Flipcard Magazine Mosaic Sidebar Snapshot Timeslide sql lab @ home 12
sql lab @ home11
sql lab @ home 10
sql lab @ home 2
1. Display the details of all the customers. (Use the AdventureWorks database) select * from [Sales].[Customer]
sql lab @ home 9
sql lab @ home 8
2. Display the ID, type, number, and expiry year of all the credit cards in the following format. (Use the AdventureWorks database)
sql lab @ home 7
sql lab @ home 4
sql lab @ home 1
sql lab @ home 2
select * from [Sales].[CreditCard] select CreditCardID,CardType,CardNumber,ExpYear from [Sales].
[CreditCard]
sql lab @ home 3
sql lab @ home 6
sql lab @ home 5
3. Display the customer ID and the account number of all the customers who live in the TerritoryID 4.
(Use the AdventureWorks database) select * from [Sales].[Customer] select CustomerID,AccountNumber from [Sales].[Customer] where TerritoryID=4
4. Display all the details of the sales orders that have a cost exceeding $ 2,000. (Use the
AdventureWorks database) select * from [Sales].[SalesOrderDetail] select UnitPrice from [Sales].[SalesOrderDetail] where
UnitPrice>2000
5. Display the sales order details of the product named 'Cable Lock' for which the ProductId is 843.
(Use the AdventureWorks database)
Dynamic Views template. Powered by Blogger.
http://sqllabhelp.blogspot.com/2014/08/sqllabhome2.html
1/6
1/28/2015
sql lab @ home 2 | SQL LAB @ HOME
select * from [Sales].[SalesOrderDetail] select SalesOrderDetailID from [Sales].[SalesOrderDetail] where
ProductID=843
6. Display the list of all the orders placed on June 06, 2004. (Use the
AdventureWorks database) select * from [Sales].[SalesOrderDetail] select ModifiedDate from [Sales].[SalesOrderDetail] where
ModifiedDate=20040606
7. Display the name, country region code, and sales year to date for the territory with Territory ID as
1. (Use the AdventureWorks database)