Question

In: Operations Management

1: Use the customers table inside of the salesordersexample database, and write a query statement to...

1: Use the customers table inside of the salesordersexample database, and write a query statement to show records from the CustFirstName, CustLastName, and CustCity columns.

2:  Use the employees table inside of the salesordersexample database, and write a query statement to show the employee’s EmployeeID, EmpFirstName, EmpLastName, and EmpPhoneNumber, if the employee is living in the 98413 zip code.

3. Use INNER JOIN to create a query result. In this query result, list each vendor’s name and the name of each product the vendor has supplied to our company. You should use the Vendors, Product_Vendors, and the Products tables in the database to complete this task.  

Solutions

Expert Solution

1: Use the customers table inside of the salesordersexample database, and write a query statement to show records from the CustFirstName, CustLastName, and CustCity columns.

All output records:

2:  Use the employees table inside of the salesordersexample database, and write a query statement to show the employee’s EmployeeID, EmpFirstName, EmpLastName, and EmpPhoneNumber, if the employee is living in the 98413 zip code.

3. Use INNER JOIN to create a query result. In this query result, list each vendor’s name and the name of each product the vendor has supplied to our company. You should use the Vendors, Product_Vendors, and the Products tables in the database to complete this task.  

All output entries are:


Related Solutions

1. For each of the following, write a single SELECT query against the TSQLV4 database that...
1. For each of the following, write a single SELECT query against the TSQLV4 database that returns the result set described. Each of these queries involves two tables and can be written using a join operation. a. One row for each order shipped to France or Germany, showing the order ID, the last name of the employee for the order, and the customer ID for the order. b. One row for each employee who handled orders to Belgium, showing the...
1.write about your plan for the database performance tuning, query optimization, and distributed database management systems.  Include...
1.write about your plan for the database performance tuning, query optimization, and distributed database management systems.  Include appropriate diagrams.
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in...
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in MM/DD/YYYY format Invoice Date in DD-Mon-YYYY format Invoice Total rounded to the nearest dollar Note: you can alias columns as you sit fit b. select data from VENDORS table as follows: Vendor Name Concatenate Vendor Name with the string ‘s Address Concatenate Vendor City, Vendor State and Vendor Zip Code (alias this) Your output should look like this (this is just an example of...
Write a SQL query that displays the number of customers from Mexico, USA, and Canada. Hint:...
Write a SQL query that displays the number of customers from Mexico, USA, and Canada. Hint: The result of the SQL query should look like the following table: CustomerCountNorthAmerica 21
This assignment refer to the “om” database (or Schema).      1.Write an INSERT statement that adds this...
This assignment refer to the “om” database (or Schema).      1.Write an INSERT statement that adds this row to the Items table:   a.       Artist:               Newly Added b.       Title:                      Assignment 3 c.        unit_price:         0.0 d.       ID:                          12 2.       Write an UPDATE statement that modifies the row you just added to the Items table. This statement should change the artist column to “RockOn”, and it should use the ID column to identify the row.    3.       Write a DELETE statement that deletes the row you...
DROP DATABASE class;CREATE DATABASE class;Use class;drop table if exists Class;drop table if exists Student;CREATE TABLE Class...
DROP DATABASE class;CREATE DATABASE class;Use class;drop table if exists Class;drop table if exists Student;CREATE TABLE Class (CIN int PRIMARY KEY, FirstName varchar(255), LastName varchar(255), Gender varchar(1), EyeColor varchar(50), HairColor varchar(50), HeightInches int,CurrentGrade varchar(1));CREATE TABLE Student (SSN int PRIMARY KEY,FirstName varchar(255),LastName varchar(255), Age int,BirthMonth varchar(255),HeightInches int,Address varchar(255),City varchar(255),PhoneNumber varchar(12),Email varchar(255),FavColor varchar(255),FavNumber int);INSERT INTO Class VALUES(1, "David", "San", "M", "BRN", "BLK", 72, "-");INSERT INTO Class VALUES(2, "Jeff", "Gonzales", "M", "BRN", "BLK", 68, "B");INSERT INTO Class VALUES(3, "Anna", "Grayson", "F", "BRN", "BRN", 62,...
1. Write a SQL statement which joins the rider_student table with the rider_major table and lists...
1. Write a SQL statement which joins the rider_student table with the rider_major table and lists the rider student name and the name of the major (major_name) and the description of the major for which they are currently assigned. (You may use the SQL 'join' subclause, or simply express the join as part of the 'where' clause by indicating that you only want records where the primary key of the child table, rider_major, equals the corresponding foreign key of the...
Please write the SQL statement for the following. I am using the Adventurework2014 database. 1. Create...
Please write the SQL statement for the following. I am using the Adventurework2014 database. 1. Create a login for AdventureWorks employees. An employee login should be composed of the first letter of a person's first name combined with their last name. In addition, the login should be all lower case characters. All the required information is located in Person.Person table. Employees can be identified by "EM" value in the PersonType field. The output should include BusinessEntityID, first name (FirstName), last...
Write the DML code to add the first row of each table to the database.
Write the DML code to add the first row of each table to the database.
1. Write the statement that will display all of the information in the PetOwner table using...
1. Write the statement that will display all of the information in the PetOwner table using the asterisk (*) notation. 2. Write the statement that will display all of the information in the PetOwner table without using the asterisk (*) notation. 3. Write the statement that will display the first and last names of the owners in that order. 4. Write the statement to display the breed, type and DOB of all pets having a type of Cat. 5. Write...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT