Week 1 - Test 5 failed

Hi,

I receive: Test 5 failed: SQL query was not correctly used to find the total number of the reviews by category. Please try again.

The SQL Query that i have prepared is:
SELECT product_category, COUNT(*) AS count_category
FROM reviews
GROUP BY product_category
ORDER BY product_category DESC

And the results seems to be similar to the expected ones:

Please, what i am doing incorrectly?
Thank you in advance

The grader checks for a specific format so incase if you have written it it any other format the result will be same but grader says its not same so i advice you to check the syntax to be followed in the description above the task

Hi Khushwanth,
Thank you for the answer. I understand that the grader checks the syntax and i have tried changing the query in several ways but all of them seems to be wrong. Could you give me a tipp? I think that the query should by correct. The exercie requests the amount of reviews per category. Perhaps is the name of the count wrong? I would like to understand waht i am doing wrong. Thank you in advance.

can you send me the grader error msg for that cell

The grade is 0/15 and the report only says:

Test 5 failed: SQL query was not correctly used to find the total number of the reviews by category. Please try again.

I think it should be order by count_categorie desc as its a number and you are sorting it out using product_categorie.

I have overreen this requirement. I will test this again. If this is the error, then i am not worry. Thank you very much

1 Like