select
f.facid, f.name,
to_char(sum(b.slots) * 0.5, '999.99') as hours
from cd.bookings as b
join cd.facilities as f on b.facid = f.facid
group by f.facid, f.name
order by f.facid asc
;
gives an answer that looks like the expected one. But due spaces it is a wrong answer. It took a quite time for me to figure out why is my query wrong. (I gave up and pressed Answer button :sweat_smile: )
There is no info about using
trim
function in the hint (for Aggregates / fachours3 exercise. Visually, the querygives an answer that looks like the expected one. But due spaces it is a wrong answer. It took a quite time for me to figure out why is my query wrong. (I gave up and pressed
Answer
button :sweat_smile: )