Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

topic: database (query language) SQL DATABASES: Q: Write the queries that result in the following scenarios and display their outputs. Q1) Type the query that

topic: database
(query language)
image text in transcribed
image text in transcribed
image text in transcribed
SQL DATABASES: Q: Write the queries that result in the following scenarios and display their outputs. Q1) Type the query that displays all attributes of products table. Q2) Type the query that displays the cities -without repetition- for all customers (from customers table) Q3) Type the query that displays the first and last names of the employees who work in OfficeCode=20 listed alphabetically by last name. Q4) Type the query that displays the numbers of orders and the country for each customerName listed alphabetically by customerName. Q5) Type the query that displays the productCode and the quantityOrdered amounts for each Code with the quantityOrdered sorted from largest value to smallest value. Q6) Type the query that displays the productName, the quantityOrdered amounts and the average price for each product name with the quantityOrdered sorted from largest value to smallest value. Q7) Define the Primary Key and the Foreign Keys for Employees, Offices and Customers Tables Q8) Design the ENTITY RELATIONSHIP Diagram between Customers and Orders table. Consider that Customer and Order are linked by the relationship PLACE In the ER designs the entities, the attributes, the keys, the relationships, the cardinalities and the entities participation

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

How do a product cost and a period cost differ?

Answered: 1 week ago