8 kyu

Register for the Party (SQL for Beginners #3)

22,568 of 22,570MaikelNabil
Description
Loading description...
Fundamentals
SQL
Databases
  • Please sign in or sign up to leave a comment.
  • rayrico Avatar

    From my understanding of this exercise, when doing different tasks with SQL (querying, changing, creating) is each respective task supposed to end with a ';' or can there just be one at the end?

  • Kifrie Avatar

    Mybe that's just me but from the way the exercise is worded, I assumed it was expected to write a query that would ONLY insert the new row IF the participant was age 21 or older. Another way to understand it would be that at any attempt that you try to add a particpant younger than 21 to the table, it would change the 'attending' column to False.

    Both ways seem too hard for a Kyu 8 level, but well... the wording should really be reconsidered.

    For my fellow strugglers: You need to first simply insert your row and then just print the table with the age-condition.

  • Ivanderrrr Avatar

    This is easy, but sometimes we forget about semicolons in SQL, good exercise

  • vNacht Avatar

    why won't using INSERT into participants Values (value1,value2,value3) work....

  • okutewonah Avatar

    This was supposed to be easy but one popular programming character made it tricky

  • KB_ Avatar

    Absolutely loved this train! Good excercise.

  • Vandanjon Avatar

    double quotes exist

  • user5763476 Avatar

    yeah agree that the kata description could be clearer on what the output should be. But this can be easily fixed. I had to read the discourse comments before trying it out that the author wanted the results to be displayed back after the insert command. ;)

  • linaperez Avatar

    I would suggest to update the Kata description to one where the output is a bit clearer. It is supposed to be for beginners and I saw a lot of comments of people struggling to understand that you need to insert AND show the resuts. Those are two queries and it can be confusing for someone just starting.But overall, it's good for practice.

  • linaperez Avatar

    I believe some of the katas I have trained on are missing some key information about the expected outcome. Here's a bit tricky because it says just insert, but not show, which is what makes the difference between doing just one query, or two, which is what you need here.

  • MaximePaul0 Avatar

    This comment has been hidden.

  • DrStein Avatar

    This task was not quite obvious for me. I've tried to perform insert-select query, until I saw in discuss that it was necessary to put ; after the first query to separate insert from select.

  • George_T Avatar

    That SELECT part that you have to add was horrendous, easily the worst kata I've done.

  • César_CCC Avatar

    This kata is bad written. I thought that was about insert-select. Also, the condition wasn't necesary. It's a simple excersice to insert. Some kate are more complicates to understand because was bad written.

  • SzaboGergo1992 Avatar

    I only miss one little detail from the description. At a beginner level it's not evident how to separete an insert from a select after it (not even evident it has to be separated to be precise). As it's a must to leave the select there, could you please add a half row to the description stating that we have to use a ";" to separete commands? Thanks :)

  • SatchelofSparkles Avatar

    I'm at 5 kyu, but this is the first "insert" kata I've come across. Thanks for widening the skill pool!

  • bestwebua Avatar

    Great kata, thank you! :)

  • programmerneo Avatar

    The instructions are not clear. If I only insert a record for myself, how are you to expect 3 records to be returned. (only 1 record will come back) Also the instructions do not say whether to insert myelf as over 21 or not. (This will determine how many records may come back)

  • Joski Avatar

    Great Kata for Kyu 8 level.

  • zvytas Avatar

    I'm not sure there's any value in making description as difficult to understand as you did. Simple "write an insert statement" would be better.

  • SmokedTurkey Avatar

    Dont forget to remove the comments in the initial solution editor. Hopefully you don't do what I did and pushed the comments, "//Your Code Here", to the next line instead of completely removing them thinking it was an SQL comment and then proceeded to submit the solution, it's not an SQL comment. :) Since I pushed it to the next line, it seems like the interpretor processed my insert then silently or gracefully exited afterwords without processing the subsequent SELECT statement at the bottom. I was bamboozled for a bit, more than I'd like to admit.

    // Your code here (not an SQL comment; the interpretor will error out--hopefully not silently) vs -- Your code here (SQL comment the SQL interpretor will skip)

    My Example:

    SELECT 'Dont forget to remove the forward slash comments below when you do the insert' FROM participants;

    //Your Code Here

    SELECT * FROM participants;

  • Unnamed Avatar

    The table content is not tested.