Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Veru good challenge. The instructions were clear and it was a good way to practice working with different dtypes and converting them accordingly. Thank you!
Agree with jwilly5.
Eventually figured out why there was some nonsense error that _0.308 -> 0.308.
But bottom line someone can and should be able to use to_char here and because the kata is the way it is that doesn't work.
It's a problem with a lot of the SQL kata on Codewars I'm noticing - just needless little nitpicky errors prevent completion
TRIM(to_char(cast(hits as float) / cast(at_bats as float), '0.999')) as batting_average
^^^^^^
This worked for me, although it looks sloppy
Not an issue
good challenge for sports lovers
This comment is hidden because it contains spoiler information about the solution
I agree
My code works but there is a rounding problem. Some of of my answers are a thousandth lower than expected. What to do ?
This comment is hidden because it contains spoiler information about the solution
I have no idea. This kata is so weird... I feel like maybe codewars have better problems in other languages and not SQL
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Format strings with free "bonus" whitespace—that's one of the more ridiculous language "features" I've seen in a while! 😆
This comment is hidden because it contains spoiler information about the solution
Remember you need to get the avg into a string and above all, you need to cast at least one of the variables as numeric otherwise you'll get 0 everywhere. PostgreSQL is awful.
Loading more items...