![]() |
.. (לתיקייה המכילה) | |
HW 1 - Question 5A - typo change | |
In HW1 SQL question 5A is not intended to find syntax errors, even though it holds some. Therefore, SQL question 5A - should be - SELECT Item.iId, Item.iName, COALESCE(SUM(quantity),0) / COUNT(*) AS res FROM Item LEFT OUTER JOIN _SaleItem_ ON SaleItem.iId=Item.iId GROUP BY Item.iId, _Item.iName_ |
HW1 clarifications | |
1. On the ERD section - some of the changes you are required to perform may seem to contradict the diagram. The question describes the entire required situation, and you are required to make all the necessary changes to make the ERD model represent them (which might include changes to existing connections). 2. SQL question 5B - In this question NULL result as the result of quantity sold or purchased for items with no sales or purchases is a considered a valid result for representing zero quantity of items. So this should not be considered as a problem. 3. SQL question 6 - refers to the total sum of money earned from the sales on each year. 4. Do not use FULL OUTER JOIN on your SQL queries. |