Describe the difference between division and modulo.Include the SpecialOfferID and Description columns in the results. If the MaxQty value is NULL, replace it with the value 10. Write a query using the Sales.SpecialOffer table that multiplies the MaxQty column by the DiscountPct column.Multiply the MinQty column by the DiscountPct column. Write a query using the Sales.SpecialOffer table.Display the difference between the MinQty and MaxQty columns along with the SpecialOfferID and Description columns. Use the AdventureWorks2012 database to complete this exercise. Explain the difference between the ISNULL and COALESCE functions.Hint: You will need to use a function to write this query. Adventureworks 2012 database query exercises pdf Rating: 4. Write a query using the Production.Product table displaying a description with the “ProductID: Name” format.Make sure that all rows display a value even if the Color value is missing. Write a query that outputs all of the columns and all of the rows from the Product table ( in the Production schema ) of the. Modify the query written in question 2 so that the description of the product is displayed in the “Name: Color” format.If the color column contains a NULL value, replace the color with No Color. Write a query using the Production.Product table displaying the product ID, color, and name columns.Write a query that displays in the “AddressLine1 (City PostalCode)” format from the Person.Address table. You can find the solutions in the Appendix. Determine which query performs the best, and explain why you think so. Explain why there is no difference in performance between the two queries. Type the following code into the query window, and then complete each question. If youre starting out and want some easy to understand resources, here are the sites I would check out and keep in mind. Ive never come across any really good resources that purely use AdventureWorks. Be sure to turn on the Include Actual Execution Plan setting before you begin. SQL tutorial using the AdventureWorks database Looking for a good SQL tutorial series that uses the AdventureWorks sample database. Write a SELECT statement that lists the customer ID numbers and sales order ID numbers from the Sales.SalesOrderHeader table.Īnswer this question: Why should you specify column names rather than an asterisk when writing the select-list? Give at least two reasons. Write a SELECT statement that lists the name, product number, and color of each product from the _Production.Product _table. Include the StoreID and the AccountNumber from the Sales.Customers table. Write a SELECT statement that lists the customers along with their ID numbers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |