[Community Puzzle] Parse SQL Queries

Hi, for the “ORDER BY DESC” testcase, it seems like you can pass it without implementing ordering. I haven’t implemented it yet but still passed it. Maybe it should be edited?

1 Like

Good observation. As the author has deleted their account, I have taken the liberty of editing that testcase.

2 Likes

Dear fellas developers.
I just arrived on the so-called SQL exercise , where I thought the goal might be to make us write some SQL , in order to extract correctly the expected datas (columns and rows).
However, I absolutely don’t get what is expected from us. The presentation of the exercise is the most confusing I’ve ever seen. I suppose a good presentation should at least present :
1_ the tables from wich we apply our SQL-requests.
2_ The result we are supposed to find. (a new one at each question).
3_ eventually tell use where they want us to write the request , (a string in a console.log ? or a string attributed to a given variable name ? or else… )

I suppose I’m the dumb one , and that you all understood the exercise fast, clear and obvious. Would you guide me on what do they expect from us here ?
A thousand thanks.

3 Likes

Have you read the statement and study the example at the bottom? I think they have more or less described what you have asked for. Also, the default code tells you how to output your answer.

It is not a SQL puzzle … you don’t have to write the good SQL request to find something in the database, you have to write a programm that interpret and execute a given SQL request.

This is the worst puzzle, so you have to answer each question with the exact words like the testcases, if I want to change my answer with a different scenario it is impossible and always is an error although the syntax is correct.
Can someone tell me if I am mistaken or what is going on ?

It is NOT a database allowing you to query whatsoever.
It has preset, fixed, inputs and outputs.
Because it is just a puzzle, not a DB. All puzzles behave in the same way.
Judging it to be bad based on the fact that it is not a DB and it does not accept alternative queries is unfair.

But for its unclear definition of requirements and statements, personally I do not think this is a great puzzle.

do you solve it?
I am stuck, I found the answer for every scenario but still cant solve the puzzle. is there any way ?

i am completly agree with, as my first puzzle in coding game and really understand the interface, this puzzle is completly shit… you never use it that way…

it’s more a medium puzzle. many parsing to do.
the puzzle is nice.

I’ve bumped the level to Medium, reordered the test cases, renamed the validators to match them, and made lots of other clarifying changes in the description.

I’ve changed a single test case to more closely match its validator, as stated on the contribution page, and updated the statement now that selection is always on strings and ordering is always on numbers.

All my tests passed in edit mode but not the last one in validation.
No brutforce used.(And I do not know why since the are no explanation of succes of not for each test)
For 80% of succed and a lot of time to parse string data, no exp points is a very poor result…
Moreover I would give a 100 point for full succes and not 50 for that one…(and maybe 50 for half succed ?)

Tests and validators are different. It’s possible that your code misses something that appears in the validator only.

The only major difference between “Slightly more advanced” (test) and “Slightly more advanced” (validator) that I can see is that the validator requires ORDER BY ASC instead of ORDER BY DESC. Perhaps you can first check whether your code handles different ordering correctly? For example, you may revise the test slightly and test your code against the revised test.