Does anyone have the exact answers to the questions for the Data Science Foundations Exam Part 2?
I’m pretty confident my answers are valid, but it is still not detecting them as correct. Unless it’s a known issue with that particular exam?
Does anyone have the exact answers to the questions for the Data Science Foundations Exam Part 2?
I’m pretty confident my answers are valid, but it is still not detecting them as correct. Unless it’s a known issue with that particular exam?
A good way to find out is if you post the coding question and then your formatted code so others can review it/chime in.
Just taking the first question as an example:
Write a SQL query that selects all pets from a pets
table, and entries meet both of the following conditions:
name
field that has a value starting between (and not including) the letters 'D'
and 'G'
type
field with the value of 'cat'
Ensure the query result is ordered by the name
field.
My answer was:
SELECT *
FROM pets
WHERE name > ‘D’ AND name < ‘G’
AND type = ‘cat’;
This query is returning the right pet names in the output, but it is still not being marked as correct by the website.
Also in the next question the system didn’t get my answer!
The school
table stores students’ names in the name
field, their graduation years in grad_year
, and their math scores in math_score
.
Write a SQL query that returns the average math_score
for every grad_year
. The result should be grouped by the grad_year
field.
SELECT AVG(math_score) AS average, grad_year
FROM school
GROUP BY grad_year;
Did you AVG
students’ math_score
values and GROUP
by grad_year
?
What did I wrong?
Do they maybe want you to use LIKE %___
or BETWEEN
?
all the second part of this exam is NOT functional!
I’ve done the third task and get the right table, but my answer have not pass the check!
I have use BETWEEN but my answer was marked as incorrect
It’s the same issue with all the questions in the part 2 exam. I’ve tried using different variations of code such as LIKE and ranges with %. Still not getting the check mark for getting it right.
is there any chance to contact someone who could check is there any problem with the exam?
taking an exam is already a stress, and if there is some technical issues - it doubled
Maybe there’s a bug(?). I don’t know…
So, your best bet is to search the forums for other similar threads with a solution and/or report it here.
If I am not mistaken, your query does not meet the above specification.
Have you experimented with having the grad_year
as the first column of the result instead of the second column?
Also, have you tried not using an alias for the average column in the result (i.e. omitting the AS average
) from the query?
That was it! Omg. Thought i was going crazy
I don’t think your solution meets the answers criteria:
They want the product name, price and locations only. The other columns are not necessary.
Also as a note, try to return the answers in the order that they give them. The answers wanted aren’t the most flexible as I’ve learned after a few trials
Thank you all for support, it was not technical fault, but only my poor knowledge of SQL.
I have should just repeat some of syntax, and voilà
I tried this in the LEFT JOIN example and it doesn’t seem to like it either but I’m not sure why:
SELECT name, price, location
FROM product
LEFT JOIN warehouse
ON product.warehouse_id = warehouse_id;
ELECT *
FROM pets
WHERE name > ‘D’ AND name<‘G’ AND type=‘cat’
ORDER BY name;
SELECT *
FROM pets
WHERE name BETWEEN “D” AND “G”
AND type = “cat”
ORDER BY name;
I keep inputting this code, and I am getting the following error:
What is wrong? I feel as though my answer is correct.