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.
Hello I'm a beginner so this sentence made me confused:
'Practise some SQL fundamentals by making a simple database on a topic you feel familiar with. Or use mine, populated with a wealth of Sailor Moon trivia.'
I tapped query: 'create database dog;' thinking I have a task to make database on a topic that im familiar with. But this was not at all the assignment.
Please make assignment more clear by deleting mentioned above sentence.
return schema added to description, please approve
https://www.codewars.com/kumite/666d6130ac89e9b1857a3ddd?sel=666d6130ac89e9b1857a3ddd
I could not understand what is wrong in my solution?
Can smbd help me? I even unblock the solutions by other to compare.
#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
instruction are not clear AT ALL regarding wins and losses.... extremely frustrating
This comment is hidden because it contains spoiler information about the solution
At first I thought I had dones something wrong when it returned zero rows, but I tested for the Slytherin conditions and there are no students that match.
Few suggestions to the author:
Fix task description - very vague explanations that mislead.
Test cases don't show the problem in your code, generally, they always pass, and only after an attempt I can see some errors.
The difficulty seems to me rather 6 kyu.
I have no idea what am I doing wrong. I display two tables in two distinct SELECT statements:
first with three columns name, won, lost, where each name has total sum of wins and losses (minus forbidden kicks);
second ordered by total wins only top six.
As I test it I get the info that the output doesn't have three columns. What's the matter? Do I understand the instructions wrong?
@edit: Kata doesn't allow creating new tables - You have to display the 'fighters' table with appropriate conditions.
I notice that this kata has an issue with aliases. I know they aren't technically needed except for joins but I didn't expect errors to be thrown from using them.
I thought this could probably be considered a level 6 kyu, overall nice though, thanks.
You should drop the
expect($sql.upcase).to include("LEFT OUTER JOIN").or include("LEFT JOIN")
test as the kata can be competed with any type of join (exceptINNER
).Alternatively, you must add a note to the description, and (preferably) add this check to the sample tests.
There should be an edge case where the
modifiedStrength
is in range(39, 40)
to disallow wrong solutions like this one.I think the database design is a bit wonky. I think a better design might be separate tables for elements and Multiplers. Something like
Elements(element_id, element_name
andMultipliers(attacking_element, defending_element, multiplier)
. It was a bit unclear to me at first that theMultipliers
table was only for pokemon attacking grass types (which works for this challenge, but, again, I don't think is a very well-designed structure).