Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is designed to let you have a hands-on experience writing advanced SQL query statements - subqueries and complex joins. Subqueries: one way to

image text in transcribed
image text in transcribed
image text in transcribed
This assignment is designed to let you have a hands-on 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 many joins and related 'and' and or conditions. Consider the following database schema for Greensboro Shop Items(itemlD string, name string, description string, qtylnStock integer) Departments(deptID string, name string, location string, telNumber string, budget real, manager string) Suppliers(suplDsring, name string, address string) Orders(ordID string,ordDate date, shipAddress string Employees(empID string, firstName string, lastName string, ssn string, telNumber 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, empID string In this assignment, your task is to write SQL queries that answer the following questions based on the database GShop from Homework 4 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 the SQL keyword distinct only when necessary. Please put your SQL query statements and their results into a SQL script file. Run your SQL statements on the MySQL Database Server. Make sure that your SQL script file does not contain any syntax errors before submitting to the Assignment Link Homework 5

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions