Question: 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


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
Get step-by-step solutions from verified subject matter experts
