Question

Using this relations scheme:

1.. products FK product Code product and productLine productScale product Vendor product Description QuantityinStock buy Pric

write these queried in relational algebra

2.List productCode, productName, and productVendor for each product that has never been ordered in June. Remember that we have the month function that returns the number of the month component of a data, and January is month number 1.

3.List the Customers that did not Order any products in 2015.

4.List all CustomerNames who have never had an order go to the ‘Shipped’ status.

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

2.

\piproducts.productCode, productName, productVendor( month(orderDate) != 6 (products \Join orderDetails \Join orders ) )

3.

\picustomers.customerNumber, customerName ( year(orderDate) != 2015 (customers \Join   orders ) )

4.

\pi customerName ( status != 'Shipped' (customers \Join   orders ) )

Do ask if any doubt. Please up-vote.

Add a comment
Know the answer?
Add Answer to:
Using this relations scheme: write these queried in relational algebra 2.List productCode, productName, and productVendor for...
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
  • uu Payments check Number paymentate amount customer Number Offices officeCode city phone addressLine1 addressLine2 state country...

    uu Payments check Number paymentate amount customer Number Offices officeCode city phone addressLine1 addressLine2 state country postalCode territory officeLocation # Customers customer Number customerName contactLastName contactFirstName phone addressLine1 addressLine2 city state postalCode country sales RepEmployeeNumber creditimit customer Location Employees employeeNumber lastName firstName extension email reports To job Title officeCode E Product Lines productline textDescription Orders order Number order Date requiredDate shipped Date status comments customerNumber Order Details orderNumber product Code quantity Ordered priceEach orderline Number Products product Code productName productScale...

  • Create the following SQL Server queries that access the Northwind database Same as problem 3 but,...

    Create the following SQL Server queries that access the Northwind database Same as problem 3 but, limit the list to all customers who placed 3 or more orders. The product id, product name, last date that the product was ordered for all items in the Grains/Cereals category. (Hint: Use MAX) The product ID, product name, and number of distinct customers who ordered that product in 1996 Thank you. Categories Customers Employees Order Details Orders Products Shippers 9 CategoryID CategoryName Description...

  • Write a query that lists the top 3 suppliers ordered by their contact name in descending...

    Write a query that lists the top 3 suppliers ordered by their contact name in descending order Write a query that list all the countries that start with the litter M. Make sure you don’t have any duplicates. List all product Name and unit price. Order the result by the unit price un descending order Customer > Customer int <p FirstName nvarchar(40) LastName nvarchar(40) City nvarchar(40) Country nvarchar(40) Phone nvarchar(20) 8 IndexCustomerName Supplier Supplier int spk Order Order int <pk>...

  • Question for SQL in MS SQL Server Management Studio (Please don't use where clause for Joins...

    Question for SQL in MS SQL Server Management Studio (Please don't use where clause for Joins use from clause) Need to Create a Query because Northwind Traders has decided to increase their retail prices. Write a query that shows the product name, the current price, and the new price. Make sure the new price is listed to 2 decimal points. Follow below guidelines on new retail price: a.         If the category is beverages or dairy products, increase the price by...

  • Hello, I need help answering all 8 of these questions for my BIS 422 class. I...

    Hello, I need help answering all 8 of these questions for my BIS 422 class. I need the appropriate MySQL script to use for these questions Provide the SQL for the following data requests. Your SQL should be written as a single script that can be pasted into MySQL and run without edits. Make sure you use the proper notation for your comments (see the practice solution for an example of the format). There will be a 5% deduction for...

  • 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,...

  • 1,List the first and last name of the donators that donated in December 2009. 2. List...

    1,List the first and last name of the donators that donated in December 2009. 2. List the ID's of the volunteers that have not worked. 3. List the ID, first name, and last name of any employees who works in the Finance department. 4. List all the different prices suppliers have for 'Tasty Meat' product. 5. Select the store ID and store phone number for all stores in 'St.Paul'. 6. List the member first and last name, address, city, zip...

  • Using the database: Write SQL queries for each of the questions below. 1. Find the media...

    Using the database: Write SQL queries for each of the questions below. 1. Find the media type which has 100 or more tracks. Print the name of such media type. Number of rows returned in the result = 3 A) Find the playlists which have one or more tracks that have never been purchased in California (CA). Print the Id, and the name of such playlists. Number of rows returned in the result = 18 B) Find the customers who...

  • SQL queries and procedures TABLE: Employees Business Rules: EmployeeID is defined as the primary key. Address...

    SQL queries and procedures TABLE: Employees Business Rules: EmployeeID is defined as the primary key. Address has been denormalized to include City and State for performance reasons. DeptNbr is a foreign key that references DeptNbr in the Department table Manager is a foreign key that references EmployeeID in the Employees table Data Structure: (EmployeeId, LastName, FirstName, Street, City, State, Zip, DateOfHire, DateOfBirth, JobTitle, Salary, DeptNbr(fk), Manager(fk)) TABLE: Department Business Rules: DeptNbr is defined as the primary key. Data Structure: (DeptNbr,...

  • 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