Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer questions 1 - 10 Screen capture each answer Place in word document 1- Create a list of employees whose office is in London. 2-

Answer questions 1 - 10

Screen capture each answer

Place in word document

1- Create a list of employees whose office is in London.

2- Create a list of employees whose title is Sales Representative.

3- Create a list of employees who are women.

4- Create a list of customers whose country is Mexico.

5- Create a list of customers who do not have a region code.

6- Create a list of customerIDs who used Speedy Express as the shipper.

7- Create a list of orders who used SupplierID of 1.

8- Create a list of products who used SupplierID of 1.

9-Create a list of ordersIDs where the unit price is greater than $10.00

10-Create a list of orderIDs where the discount is grater than 0.

SELECT *

FROM employees;

SELECT *

FROM employees

WHERE birthdate > '1958-01-01';

Employee 2 and 5 are missing

SELECT *

FROM employees

WHERE birthdate < '1958-01-01';

Employee 2 and 5 are displayed

SELECT *

FROM employees

WHERE hiredate < '1994-01-02';

Employees 1 thru 6 are displayed

SELECT *

FROM employees

WHERE hiredate > '1994-01-02';

Employees 8 and 9 are displayed

SELECT *

FROM employees

WHERE region is null;

Employees 5,6,7 and 9 are displayed

SELECT *

FROM employees

WHERE region is not null;

Employees 1 thru 4 and 8 are displayed

SELECT titleofcourtesy, firstname, lastname, title

FROM employees;

SELECT CONCAT( titleofcourtesy, " ", firstName, " ", lastname ) AS 'Employee Name' FROM employees

SELECT CONCAT( titleofcourtesy, " ", firstName, " ", lastname ) AS 'Employee Name'

FROM employees

ORDER BY lastname;

SELECT CONCAT( titleofcourtesy, " ", firstName, " ", lastname ) AS 'Employee Name',

CONCAT(Address, " ", City, ", ", Region, " ", PostalCode) AS Address

FROM employees

ORDER BY lastname;

SQL result

Host: 127.0.0.1 Database: northwind Generation Time: Mar 19, 2017 at 07:12 PM Generated by: phpMyAdmin 3.5.2.2 / MySQL 5.5.27 SQL query: SELECT CONCAT( titleofcourtesy, " ", firstName, " ", lastname ) AS 'Employee Name', CONCAT(Address, " ", City, ", ", Region, " ", PostalCode) AS Address FROM employees ORDER BY lastname LIMIT 0, 30 ; Rows: 9

Employee Name

Address

Mr. Steven Buchanan

NULL

Ms. Laura Callahan

4726 - 11th Ave. N.E. Seattle, WA 98105

Ms. Nancy Davolio

507 - 20th Ave. E. Apt. 2A Seattle, WA 98122

Ms. Anne Dodsworth

NULL

Dr. Andrew Fuller

908 W. Capital Way Tacoma, WA 98401

Mr. Robert King

NULL

Ms. Janet Leverling

722 Moss Bay Blvd. Kirkland, WA 98033

Mrs. Margaret Peacock

4110 Old Redmond Rd. Redmond, WA 98052

Mr. Michael Suyama

NULL

SELECT companyname, contactname, phone, country

FROM customers

WHERE companyname like "c%";

SELECT companyname, contactname, phone, country

FROM customers

WHERE companyname like "co%";

SELECT companyname, contactname, phone, country

FROM customers

WHERE companyname like "c%"

AND country = 'UK';

SELECT companyname, contactname, phone, country

FROM customers

WHERE companyname like "c%"

AND NOT country = 'UK';

SELECT *

FROM suppliers

WHERE region = " ";

SELECT *

FROM suppliers

WHERE region IS NULL;

SELECT *

FROM suppliers

WHERE region IS NOT NULL

AND Fax IS NULL;

SELECT *

FROM suppliers

WHERE region IS NOT NULL

AND Fax = ""

AND Country = "UK";

SELECT *

FROM suppliers

WHERE region IS NULL

ORDER BY city DESC;

SELECT *

FROM suppliers

WHERE region IS NULL

AND country = 'Germany'

ORDER BY city;

SELECT *

FROM suppliers

WHERE region IS NULL

AND country = 'Germany'

ORDER BY city DESC;

USE information_schema;

SELECT * FROM `COLUMNS` WHERE table_schema = 'Northwind';

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago