You are attempting to find information on the eldest child f…

You are attempting to find information on the eldest child for each guest who has brought one or more children to the FamCation resort. Which of the following statement(s) is(are) TRUE about the SQL code below?   With EldestKid as(Select g.GuestID,  g.LName as ‘Guest Lastname’,  f.FName as ‘Child Name’, f.Birthdate,             rank () over (partition by g.GuestID order by f.Birthdate asc) as ‘kidOrderRank’from GUEST g Inner Join FAMILY f on g.GuestID = f.GuestID)   Select * from EldestKidWhere kidOrderRank = 1Order by [Guest Lastname];

Based on data in the FamCation DB, executing the following C…

Based on data in the FamCation DB, executing the following CTE and Select statements will produce the query result listing the longest distance activity for each activity type.   With Activity_Distance_CTE As( Select Type, ActID, Hours, PPP, Distance,               row_number() over (partition by Type order by Distance) as RowNo  From Activity ) Select Type, ActID, Distance as ‘Longest Distance’From Activity_Distance_CTEWhere RowNo = 1  

The following SQL statement will compile and produce the a l…

The following SQL statement will compile and produce the a list of cleaning counts by building.   Select bldgnum, HKID, count(*) as ‘Cleaning Count’from CLEANINGWhere bldgnum = ‘A’             and HKID like ‘A%’Group by bldgnumHaving count(*) > 5