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.
It works because n is type integer, therefore postgress will perform integer division, that is any decimal will be removed/ignored.
n=5 -> 25/4=6.25 which becomes 6 (3*2)
n=9 -> 81/4=20.25 which becomes 20 (5*4)
etc.
amogus
This comment is hidden because it contains spoiler information about the solution
You should only return one column, column res.
I did it right, I only return numbers. I just wanted to tell that if I insert the # I get the test right, but not the real attempt.
user_id should only contain numbers, not the #. The sample tests only check you return 3 columns and with the proper names. There is no test about the content there.
If I do the test giving '#{number}' as output (with # before), the test passes.
If I do the real attempt, it tells me '{number}' expected but '#{number}' found.
I think it's a bug.
This comment is hidden because it contains spoiler information about the solution
Thank you for the guidelines about the comments and about the exercise. I solve it, thanks again.
Not a kata issue, check your parentheses (where you wrote AS res), and read this: https://docs.codewars.com/training/troubleshooting/#post-discourse
BTW, there is no need to write
expression_matter.
everywhere, you're doing a select in a single table, you can ommit it.This comment is hidden because it contains spoiler information about the solution