67. Display boat names and the count of sailors who are younger than the average sailor age and have a rating above 7, ordered by count:
SELECTb.bname, COUNT(s.sid) AS sailor_countFROM Boats bLEFT JOIN Sailors s ONb.bid=s.sidWHEREs.age< (SELECTAVG(age) FROM Sailors) ANDs.rating>7GROUP BYb.bnameORDER BY sailor_count;
68. Retrieve sailors who have sailed on boats with a length that is a power of two:
69. List sailors who have sailed on boats that have been sailed on by sailors with a rating above 9:
SELECTs.snameFROM Sailors sINNER JOIN Boats b ONs.sid=b.bidWHEREb.bidIN (SELECT bid FROM Sailors WHERE rating >9);
70. Display boat names and the total count of sailors who are younger than the average sailor age and have a rating above 8, ordered by count:
SELECTb.bname, COUNT(s.sid) AS sailor_countFROM Boats bLEFT JOIN Sailors s ONb.bid=s.sidWHEREs.age< (SELECTAVG(age) FROM Sailors) ANDs.rating>8GROUP BYb.bnameORDER BY sailor_count;