write the sql queries for the following er diagram: Create all the tables and relationships (including all primary keys, foreign keys, attributes and appropriate data types) shown in the ER diagram above.and Insert 3 records into each table. In the Item table, consider the first record as your favorite dress, second record as a gift that you have recently bought to someone, and the third record as your most favorite accessory that you are currently using; then insert the appropriate data. Similarly, insert some valid data into the other three tables. and Write an SQL statement to update the third row of Item table: Item_Name as ‘Hat’, Brand as ‘Puma’, and Type as ‘Ferrari’. and Write an SQL statement to display the Branch_ID, Location_ID, Item_ID, Units_Sold and Dollars_Sold of each customer. Results should be in a descending order of Item_ID.and also Write an SQL statement that displays the number of items, the sum of units_Sold and the sum of dollars_sold in each location. (Hint: Use group-by).and Write an SQL statement to commit the database.and Write an SQL statement to display all the tables’ data separately. (Hint: Use select and display data separately for each table. No need to use any joins.)and Write an SQL statement drop all the tables that you have created in this assignment.and Write an SQL statement to
write the sql queries for the following er diagram:
Create all the tables and relationships (including all primary keys, foreign keys, attributes and appropriate data types) shown in the ER diagram above.and Insert 3 records into each table. In the Item table, consider the first record as your favorite dress, second record as a gift that you have recently bought to someone, and the third record as your most favorite accessory that you are currently using; then insert the appropriate data. Similarly, insert some valid data into the other three tables. and Write an SQL statement to update the third row of Item table: Item_Name as ‘Hat’, Brand as ‘Puma’, and Type as ‘Ferrari’. and Write an SQL statement to display the Branch_ID, Location_ID, Item_ID, Units_Sold and Dollars_Sold of each customer. Results should be in a descending order of Item_ID.and also Write an SQL statement that displays the number of items, the sum of units_Sold and the sum of dollars_sold in each location. (Hint: Use group-by).and Write an SQL statement to commit the database.and Write an SQL statement to display all the tables’ data separately. (Hint: Use select and display data separately for each table. No need to use any joins.)and Write an SQL statement drop all the tables that you have created in this assignment.and Write an SQL statement to rollback the database.and Write an SQL statement to display all the tables’ data separately. (Hint: Use select and display data separately for each table. No need to use any joins.) and If you get any data displayed in question-11, list the names of all the tables that got displayed and tell us why there is still data existing despite you dropping all the tables in question-09. (Please answer this in comments).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images