Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

00060000-fachours3.ex solution does not suggest the trunc function #80

Open
eldad opened this issue Nov 13, 2023 · 0 comments
Open

00060000-fachours3.ex solution does not suggest the trunc function #80

eldad opened this issue Nov 13, 2023 · 0 comments

Comments

@eldad
Copy link

eldad commented Nov 13, 2023

First of all - Great set of exercises, many thanks for that!

I noticed that the solution for 00060000-fachours3.ex uses char formatting (which I did not think of while solving it) and I was wondering if there is a reason for leaving out the (for me) obvious way to apply trunc(<value>, 2).
If not, could this be included? I would also be happy to contribute a PR, just let me know.

For example:

select f.facid, f.name, trunc(sum(b.slots / 2.0), 2)
	from
	cd.facilities f join cd.bookings b
		on b.facid = f.facid
group by 1,2
order by 1;

BTW - for the dataset, trunc and round yield the same results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant