Worldcup testing is very strict

I had lot of issue completing the testing for world cup project. First of all the course is great so far, I am a complete newbie and I am following along fine up to this point. Also forgive me if this should go on github because I haven’t learned how to collaborate with it yet.

My couldn’t pass the last test. Some difficulties (I wish there were clearer prompts during the process):
-There is a 66th empty line required, if left on last echo or user does not put \n, then test will fail
-Not sure if it’s the way I wrote the query, but for the 5th query “average number of goals in all games from both teams”, if user did not display decimal digit to 16 as opposed to the default 20, test fails. For reference my query is: “$($PSQL “SELECT ROUND(AVG(winner_goals) + AVG(opponent_goals), 16) FROM games”)”
-the need to order by x column for 9th 10th and 11th queries

Not sure if this is a troubleshooting prompt, but in any case, maybe some more explicit hints pointing out these areas would be appreciated by us newbies.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

Challenge: Build a World Cup Database

Link to the challenge:

1 Like

Thanks for the feedback @corgipom, and congratulations on getting this far - I’m glad you’re enjoying it. I will look at making some of those requirements more clear.

FYI, this is the better place to post issues like this - although, github would work too. Let us know if you have any more issues.

That’s great to know, definitely appreciate what you and the rest of FCC are doing! *Sent you guys some coffee from up here!

I do have one more thing to add though.

It’s embarrassing, but I have been using the reset button for a couple of the projects before this one when I got stuck with the testing. Naturally, when I’m sure the output was “fine” but not passing, I pressed reset…which wiped the vm except for my worldcup.sql. I didn’t push to github either, so it’s a lesson learned and forced practice.

Some warning on reset would probably save some morale I would think.

In case your test case doesn’t pass and you are sure that you are doing it right, you can also restart the terminal. First, exit it using the command exit (not the x button). Then start a new terminal like this:

Thanks! I will keep that in mind next time.

Yea, on this particular project, you start with a database full of errors and things to change. So the reset button reverts to that - in case someone make mistakes and can’t get back on track - like maybe they delete a table or something. We could probably add an extra note about that.

Hello everyone!
I am not sure if this is the right place to ask but i have been stuck on the last four commands in for some hours now. I am very confused what commands should go into these queries and every attempt resulted in one error or the other. here are the queries

echo -e "\nList of teams who played in the 2014 'Eighth-Final' round:"
echo $($PSQL "SELECT name FROM teams WHERE team_id=(SELECT winner_id FROM games WHERE year=2014 AND round='Eight-Final' UNION SELECT opponent_id FROM games WHERE year=2014 AND round='Eight-Final')")

echo -e "\nList of unique winning team names in the whole data set:"
echo  $($PSQL "SELECT name FROM teams WHERE team_id=(SELECT winner_id FROM games)")

echo -e "\nYear and team name of all the champions:"

echo -e "\nList of teams that start with 'Co':"

I have completed all other challenges on my own so far and I have been struggling with these four queries. I would appreciate any hint on how to combine these commands to make the queries right.

I had it figured after reading the man page for the JOIN command. Thanks to a cue from a friend. I hope this helps someone.

“if user did not display decimal digit to 16 as opposed to the default 20, test fails"

THIS. How could I know that I was supposed to COUNT ALL THE ZEROS TO SEE IF THE NUMBERS MATCH??? I get the idea behind the hidden specifications that we have to understand from the ‘expected output’ file, like adding ORDER BY x column to the lists, that makes sense, but that one is really mean. There should at least be a ‘hint’ section in the instructions for those hidden specs, IMHO.

Anyway, that was a great exercise, thanks!