If you have any doubts, please give me comment...
1)
pno | color |
P1 | Red |
P4 | Red |
2)
p.pno | color |
P1 | Red |
P1 | Red |
P1 | Red |
P4 | Red |
P4 | Red |
3)
p.pno | color | Sno | Qty |
P1 | Red | S1 | 300 |
P1 | Red | S2 | 200 |
P1 | Red | S3 | 100 |
P4 | Red | S1 | 200 |
P4 | Red | S5 | 200 |
2. Part 2 Given a set of tables with their content (tuples/rows), show what would be...
Questions in this part ask you to write SQL queriesthat would retrieve certain information from the tables. For each question, write the SQL query that would display the information asked by the question. Display information about parts that have their weights greater than the average weight of all parts. PNO PNAME P2 BOLT P3 SCREW Find supplier numbers who supply any screws (i.e., such that the part name is ‘screw’). The constraint is that you may not use any join or...
Use the give table below to answer the following questions. sName Smith sCity SI S2 PI P2 P3 P4 PS Nut Bolt Red Blue 12 17 17 10 Blake Paris Screw Red S4. S5 30 Athens Blue 12 SP SNo (PK) (FK S1 S1 S1 S1 S1 S2 S2 S3 S3 S3 S4 P1 P2 P3 P4 PS PI P2 Pl P2 P3 P2 P3 P4 200 100 100 200 200 200 S5 Table: Content of the Supplier-Parts DB Tables...
Using Figure 2. show what would be displayed by the following SQL queries should they be executed against the tables having content (tuples/rows) shown in Figure 2. In each answer to a question, do not forget to display column headings in addition to the tuples/rows that would be shown. 1. SELECT pNo, MAXIat), (SELECT MAX(t) FROM sp WHERE pNo IN (SELECT RNR FROM p WHERE RNam晨= 'cam') )AS MAXcao FROM GROUP BY HAVING MAXIqty)> ALL (SELECT aty FROM Sp WHERE...
Create the database and tables for the database. Show all SQL statements. Include primary and foreign keys. Insert data into each table. Show select statements and display the output of each table. Note:Student’s name must be inserted into table as part of the data! Perform the SQL below: Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and...
QUESTION 1 The following tables form part of a database held in a relational DBMS for storing the information of Customer, Item, Transaction, and temSale A transaction can contain multiple items and an item can be in multiple transactions as depicted in the following sample data Item(itemid, name, category, price Itemid pk) name category price Iteml Pencil Stationery $30 paperStationery Item2 $25 $15 Item3 Cards Stationery S40 Item4 Ink Stationery S13 Item5 Sprite Itemo Food S4 Milk Food Transaction ctransid,...