Documente Academic
Documente Profesional
Documente Cultură
Spring 2018
TAL 3-10
Give the item number, description, and on-hand value for each item in category GME.
SQL VIEW
SQL VIEW
SELECT Item.[Category], Item.[ItemNum], Item.[Description], Item.[OnHand], Item.[Storehouse], Item.[Price], Item.[OnHand Value]
FROM Item
ORDER BY Item.[Category], Item.[ItemNum];
TAL 3-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 VIEW
SQL VIEW
SQL VIEW
SQL VIEW
SQL VIEW
SELECT Reservation.ReservationID, Customer.LastName, Trip.TripName
FROM Trip INNER JOIN (Customer INNER JOIN Reservation ON Customer.[CustomerNum] = Reservation.[CustomerNum]) ON Trip.[TripID] = Reservation.[TripID]
WHERE (((Reservation.NumPersons)>4));
CAT 3-14
List the reservation ID, trip name, customer’s last name, customer's first name, and total cost for all reservations where the number of
persons is grater than four. Use the column name TotalCost for the calculated field.
SQL VIEW
SELECT Reservation.ReservationID, Customer.LastName, Customer.FirstName, Trip.TripName, Reservation.TotalCost
FROM Trip INNER JOIN (Customer INNER JOIN Reservation ON Customer.[CustomerNum] = Reservation.[CustomerNum]) ON Trip.[TripID] = Reservation.[TripID]
WHERE (((Reservation.NumPersons)>4));
CAT 3-15
Create a new table named Solo that includes the reservation ID, trip ID, trip date, trip price, other fees, and customer number for all
reservations that are only for one person.
SQL VIEW
SELECT Reservation.[ReservationID], Reservation.[TripID], Reservation.[TripDate], Reservation.[TripPrice], Reservation.[OtherFees], Reservation.[CustomerNum]
INTO Solo
FROM Reservation
WHERE (((Reservation.NumPersons)=1));
CAT 3-16
Use an update query to change the OtherFees value in the solo table to $5.00 for all records on which the OtherFees value is $0.00.
SQL VIEW
SQL VIEW