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.
If you have any doubts, please give me comment...
1)
pNo | MAX(qty) | MAXcam |
P1 | 300 | 100 |
P2 | 400 | 100 |
P3 | 400 | 100 |
P4 | 200 | 100 |
2)
pNo | MAX(qty) | MAXcamORnut |
P1 | 300 | 300 |
P2 | 400 | 300 |
P3 | 400 | 300 |
Using Figure 2. show what would be displayed by the following SQL queries should they be...
2. Part 2 Given a set of tables with their content (tuples/rows), show what would be retrieved if the given SQL queries were issued Consider tables, of a Supplier-Parts DB, shown in Figure 2. Names of tables, columns and identification of primary foreign keys are shown. Questions in this part ask you to 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...
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...
In using a database created from this model, which of the following SQL queries would give us a list of customers who have daily deposit transactions (deposit is a transaction type) totaling $10,000 or more across all of their accounts (i.e., this is a total across all accounts of a customer, not per account). Include in this list the Customer ID and name, and the dates and their respective daily total. SELECT c.cust_id, c.cust_name, DATE(t.tran_date), SUM(t.tran_amount) AS daily_total FROM Customers...