You are on page 1of 6

CH2-EX-QBE

Praneeth Reddy Seelam
ID:3911948
8. How many customers have a credit limit of $15,000?

SQL query:
SELECT Count(Customer.CustomerNum) AS CountOfCustomerNum
FROM Customer
HAVING (((Customer.CreditLimit)=15000));

Result:

We can also do it in design view as

ItemNum. description.ItemNum. [Item]![OnHand]*[Item]![Price] AS [on-hand value] FROM Item GROUP BY Item. Give the item number. SQL query: SELECT Item.Description. Item.Category. and on-hand value (OnHand * Price) for each item in category GME.Category)="GME")).Description. Item.CH2-EX-QBE Praneeth Reddy Seelam ID:3911948 10. [Item]![OnHand]*[Item]![Price] HAVING (((Item. Item. .

[item]. .[OnHand] . SQL query: SELECT item. [item]. Description.ItemNum.Create a new table named Toy to contain the columns ItemNum.[Description] .CH2-EX-QBE Praneeth Reddy Seelam ID:3911948 Output: 14. item. OnHand.Price INTO toy FROM item where Category='toy'. and Price for all rows on which the category is TOY.

” SQL query: UPDATE toy . change the description of item DL51 to “Classic Train Set.CH2-EX-QBE Praneeth Reddy Seelam ID:3911948 Result: 15.In the Toy table.

ItemNum='DL51'.Description='Classic Train Set' WHERE toy.CH2-EX-QBE Praneeth Reddy Seelam ID:3911948 SET toy. Output: 16. delete every row on which the price is greater than $120. SQLquery: DELETE FROM toy . In the Toy table.

Result: .CH2-EX-QBE Praneeth Reddy Seelam ID:3911948 where toy.price > 120.