Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework Assignment 6 Due: Mar. 29, 2018 at 11:59 PM Note: Please type your solution in notepadotepad++ and save it as HW6YourName.sqI, otherwise I won't

image text in transcribed
image text in transcribed
Homework Assignment 6 Due: Mar. 29, 2018 at 11:59 PM Note: Please type your solution in notepadotepad++ and save it as HW6YourName.sqI", otherwise I won't grade it. This assignment is designed to let you have a hands-orn experience writing advanced SQL query statements- subqueries and complex joins. Subqueries: one way to nest or a cascade query is to stick a query in the where clause, find the names of employees worked at the department Research. This is a powerful way to take advantage of the fact that any SQL query returns a table, which can then be the starting point of another SQL query. Complex Joins: the 'where' clause can become quite complex with conditions. many joins and related and' and or Consider the following database schema for Greensboro Shop. Items(itemID string, name string, description string, qtylInStock integer) Departments(deptID string, name string, location string, telNumber string, budget real, manager string) Suppliers(supID string, name string, address string, city string, state string) Orders(ordID string.ordDate date, shipAddress string) Employees(empID string, firstName string lastName string, ssn string, teINumber string, salary real) Carries(deptID string, itemID string) Supplie(itemID string.suplD string, price real) Includes(itemID string, ordID string, qty integer) WorksIn deptID string, emplD string) In this assignment, your task is to write SQL queries that answer the following questions based on the database GShop in the ANSI-style JOIN. Each question should be answered by one SQL statement only. The result of each statement must not contain duplicates, but you should use

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_2

Step: 3

blur-text-image_3

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

Genomes Browsers And Databases Data Mining Tools For Integrated Genomic Databases

Authors: Peter Schattner

1st Edition

0521711320, 978-0521711326

More Books

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago