Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

29. Complete and print your statements and results by spooling your file (with e

ID: 3708220 • Letter: 2

Question

29.          Complete and print your statements and results by spooling your file (with echo on from Oracle if available).

List the count of loyalty customers. Use “LoyaltyCount” as the column heading.

ResDetail Customer CustlD CustFName CustLName CustPhone CustType LoyaltylD Reservation ResID CheckinDate CheckOutDate CustID AgentID ReslD Room CustType CustType CustTypeDesc RoomNum RateType RateAmt RoomType Agent AgentlD AgentFName AgentLName AgentType RateType RateType RateTypeDesc RoomType RoomType RoomTypeDesc AgentType AgentType AgentTypeDesc

Explanation / Answer

Solution:

29)

SELECT COUNT(DISTINCT LoyaltyID) AS LoyaltyCount FROM Customer

Explanation:

The count of the LoyaltyID is counted and displayed as LoyaltyCount, DISTINCT is used only to make sure that repetitive customers are not counted.

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote