SQL Guided Project Page 4

I think I have top 10 Low Stock and top 10 by Product Performance. I don’t understand how the IN operator fits into this. It seems like the CTEs need to be in the FROM clause and you’re asking for me to put it into the WHERE clause.

Any guidance is appreciated!

It is possible that there is more than one to reach the same outcome. However, I haven’t attempted this project to be sure about it.

It really depends on how you implemented it. The 2nd last Screen of the project includes the expected outcome for each question, while the last Screen includes a link to the solution. You could refer to either and compare them to your approach.

You could share your own code here and someone could potentially help better with that context as well.

Thanks for the info. I checked the expected output on page 8 and the code on page 9 and saw that I never would have gotten their answer. I am glad I checked.

I have some questions for DQ staff…

Why does the code on page 9 not produce the output on page 8? I assume the productCode in the sample solution matches the product name and product line in the output. I also understand that there are different answers to the problem but sample solution should produce the output.

Also, I believe the low stock query actually lists the high stock items. lowStock=SUM(quantityOrdered)/quantityInStock

If you hold quantityOrdered constant…
when quantityInStock is low then lowStock value is higher
when quantityInStock is high then lowStock value is lower

I tried to attach an image that compares output of lowStock sorted ASC and DESC but the gear just keeps turning and never completes the upload.

Hi @deepBlur,

I see in your last post that you have some feedback for the Dataquest staff. Could you please do the following: click the ? button in the upper-right corner of any screen of the Dataquest learning platform, select Share Feedback, fill in the form, and send it. Thank you!