Question

#1) Display Last Name, First Name, DonorId, Fundname, TotalPledged from the donor’s database (you may need...

#1) Display Last Name, First Name, DonorId, Fundname, TotalPledged from the donor’s database (you may need to use donor and pledge tables to get the information) for Donor ID 59034. (Your results window should have 3 rows) #2) Display all records from the PurchaseOrderHeader from the AdventureWorks Database that were sold by Employee 261 (Your results window should have 401 rows) #3) Display salesorderid, orderdate, totaldue, and territory name from salesorderheader and salesterritory for all totaldue that are greater than $20,000 and from the Southwest territory. List the total ascending. You will be using AdventureWorks Database. (Your results window should have 351 rows) #4) Display Salesorderid, Order date, Due date, Order Quantity, Line Total, ProductId, Name, and Color from SalesOrderHeader, SalesOrderDetail and Product tables for ProductID 771. (Your results window should have 241 rows) In any of the above queries, if you are returning more rows then specified means that you have not joined the tables correctly. In the Where clause make sure you are specifying the join condition between the tables. e.g. Where SalesOrderDetail.ProductId=Product.ProductId when you are trying to retrieve the data that is common from these two tables. #5) Create a new database called Your initials_ERD (mine would be ED_ERD). The SQL code to create a basic database is “create database ED_ERD”. Using SQL (reference examples in chapters 6 and 7) create tables and relationships that match your ERD submitted in HO #4. Include primary and foreign key constraints plus data types. (15 pts.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

The first four subparts have been answered as HOMEWORKLIB guidelines, please repost others.

The schema of the database is not given so I am taking the info which is provided and based on the writing the queries, please adjust them accordingly before executing.

1)

SELECT Last Name, First Name, DonorId, Fundname, TotalPledged FROM donor, pledge WHERE donorId= '59034'

2)

SELECT * FROM PurchaseOrderHeader WHERE EmployeeiD= '261'

3)

SELECT salesorderid, orderdate, totaldue, and territory name from salesorderheader and salesterritory FROM sales WHERE totaldue >20000 AND teritory= 'Southwest'

4)

SELECT  Salesorderid, Order date, Due date, Order Quantity, Line Total, ProductId, Name, and Color from SalesOrderHeader, SalesOrderDetail FROM Product WEHRE ProductID''771'

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Add a comment
Know the answer?
Add Answer to:
#1) Display Last Name, First Name, DonorId, Fundname, TotalPledged from the donor’s database (you may need...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Chapter 2 How to use the Management Studio Before you start the exercises... Before you start...

    Chapter 2 How to use the Management Studio Before you start the exercises... Before you start these exercises, you need to install SQL Server and the SQL Server Management Studio. The procedures for doing both of these tasks are provided in appendix A of the book. In addition, you'll need to get the Exercise Starts directory from your instructor. This directory contains some script files that you need to do these exercises. Exercises In these exercises, you'll use SQL Server...

  • Fundamentals of Database Systems Consider the following data. Arrows show the functional dependency Product Item ld...

    Fundamentals of Database Systems Consider the following data. Arrows show the functional dependency Product Item ld QuantityItem Used uct Receipt Quantity Sales ription Number Num Description Date The arrows in this question indicated the determination of two attributes. For example, the arrow that goes ProductID to ProductDescription indicates that ProductID determines the ProductDescription, This in turn means that Productld can be considered as primary key for ProductDescription a) Write the tables b) Place the tables in 3rd normal form (if...

  • Help In Database: Next comes the data entry: Make up data for your database, or find...

    Help In Database: Next comes the data entry: Make up data for your database, or find real data. You can enter the data with INSERT statements, but it is much easier to use PhpAdmin. It has a form where you can type the data directly. Alternatively, you can use PhpAdmin to import CSV data (comma-separated values), which you can export from Excel. Include at least 3 rows in each of the entity relations, and as many rows as you need...

  • The lab for this week addresses taking a logical database design (data model) and transforming it...

    The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...

  • The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind...

    The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world. Here is the schema of the database: Products (ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued); Suppliers (SupplierID, CompanyName, ContactName , ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage); Categories (CategoryID, CategoryName, Description, Picture); Orders (OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia,  Freight, ShipName,ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry); Order_details (ID, OrderID,...

  • A database used for a toy store that keeps track of the inventory and purchase orders...

    A database used for a toy store that keeps track of the inventory and purchase orders from the store. All clients will have their membership ID card to shop. This database will help the store to keep track of their orders. It will also help the store to know how many products are available in the inventory. It is necessary to have a membership to purchase a product. The customer can also bring coupons to get discount. Key attributes: Salesman:...

  • A database used for a toy store that keeps track of the inventory and purchase orders...

    A database used for a toy store that keeps track of the inventory and purchase orders from the store. All clients will have their membership ID card to shop. This database will help the store to keep track of their orders. It will also help the store to know how many products are available in the inventory. It is necessary to have a membership to purchase a product. The customer can also bring coupons to get discount. Key attributes: Salesman:...

  • Instructions: You are required to create ERD and Enhanced ERD diagrams. And also translate your own...

    Instructions: You are required to create ERD and Enhanced ERD diagrams. And also translate your own created ERD & EERD diagrams in to Relational Model. Q# 1: Draw ER diagram based on the following database requirements. A Tutorial class may have one or more students. A student may be in one or more classes. Attributes of CLASS includes CLASS CODE, ROOM NAME and CLASS SIZE. Attributes of STUDENT include STUDENT ID, NAME and NATIONALITY. Translate your ER diagram in to...

  • use workbench please Task 1: Create a database and name it practical2DB. (2 marks) Task 2:...

    use workbench please Task 1: Create a database and name it practical2DB. (2 marks) Task 2: Create all the four tables according to the relational scheme in Figure 1. (8 marks) Task 3: Insert 5 records to into each table. (5 marks) Task 4: Write a query to list alphabetically ordered names, addresses, and IDs of all the customers whose postcode is in (40150, 40400, 47500). (10 marks) Task 5: Delete 1 record from Products table using their primary keys....

  • can someone solve these quick please and thank you! sql chapter 4 Query #1: List the...

    can someone solve these quick please and thank you! sql chapter 4 Query #1: List the company name, contact name, contact title and the phone number for customers who HAVE NOT put in an order. Use an outer join. Query #2: Create a listing displaying the employee first name, last name and the full name (First name space Last Name) of the person they report to (Supervisor). This is a self-join. If an employee does not report to anyone then...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT