Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-- Use WideWorldImporters for all questions. use [WideWorldImporters]; -- Note that the Midterm Part 1 of 2 is worth 10 points -- This midterm file,

-- Use WideWorldImporters for all questions.

use [WideWorldImporters];

-- Note that the Midterm Part 1 of 2 is worth 10 points

-- This midterm file, Part 2 of 2, is worth 20 points.

-- Together both parts are worth 30 points, as posted.

---------------------------------------------------------------------------------

-- 1. Write a SELECT statement that displays all fields and records for the Sales.Customer table.

-- In your SELECT list each of the fields in the table (i.e. do NOT simply use SELECT *).

-- 1 point.

---------------------------------------------------------------------------------

-- 2. Develop a display message for customers, displayed all in one column,

-- structured as follows:

--

-- Welcome back, Aakriti Byrraju. Your credit limit is: 3500.00

--

-- If a customer has no credit limit, use the ISNULL() function to

-- display (Pending) instead, as in this example:

--

-- Welcome back, Wingtip Toys (Yaak, MT). Your credit limit is: (Pending)

-- 4 points.

---------------------------------------------------------------------------------

-- 3. Display a list of all of the products supplied by Litware, Inc.

-- Sort by product name.

--

-- Note: Though you will need to view several tables to research this,

-- your final answer should be one SQL statement based on one table.

-- I do NOT intend for your to create a join as we have not yet covered joins.

-- 3 points.

---------------------------------------------------------------------------------

-- 4. Using the Sales.Orders table, display 3 columns:

-- the order date,

-- the expected delivery date,

-- and then write an equation that displays the order date minus the

-- expected delivery date and name this new column ShippingDays.

-- 3 points.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions