Beruflich Dokumente
Kultur Dokumente
SQL query:
SELECT Count(Customer.CustomerNum) AS CountOfCustomerNum
FROM Customer
HAVING (((Customer.CreditLimit)=15000));
Result:
CH2-EX-QBE
Praneeth Reddy Seelam
ID:3911948
10. Give the item number, description, and on-hand value (OnHand * Price) for each item in category
GME.
SQL query:
SELECT Item.ItemNum, Item.Description, [Item]![OnHand]*[Item]![Price] AS [on-hand value]
FROM Item
GROUP BY Item.ItemNum, Item.Description, Item.Category, [Item]![OnHand]*[Item]![Price]
HAVING (((Item.Category)="GME"));
CH2-EX-QBE
Praneeth Reddy Seelam
ID:3911948
Output:
14.Create a new table named Toy to contain the columns ItemNum, Description, OnHand, and Price for
all rows on
which the category is TOY.
SQL query:
CH2-EX-QBE
Praneeth Reddy Seelam
ID:3911948
Result:
15.In the Toy table, change the description of item DL51 to Classic Train Set.
SQL query:
UPDATE toy
CH2-EX-QBE
Praneeth Reddy Seelam
ID:3911948
SET toy.Description='Classic Train Set'
WHERE toy.ItemNum='DL51';
Output:
16. In the Toy table, delete every row on which the price is greater than $120.
SQLquery:
DELETE FROM toy
CH2-EX-QBE
Praneeth Reddy Seelam
ID:3911948
where toy.price > 120;
Result: