Answered step by step
Verified Expert Solution
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
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 (query language)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started