Conversation
efantinatti
left a comment
There was a problem hiding this comment.
Dear Abrahim Senra Abrahao
Session 1:
1 - OK.
Session 2:
2 - Partial
-- Windowed Functions - Q3: Missing transaction time, output also not sorted.
-- String manipulations - Q1: Try making it without the product names or partially product names. The question asks with a very specific character.
-- Union - Q1: Marked OK. Just a hint. Could be ranked over asc for the first part.
Session 3:
3 - Partial
-- CROSS JOIN - Q1: The result seems not resoanable. Based on your question about understanding the question you can try it without counting customers and grouping by after the CROSS JOIN. You ay think it visually.
-- INSERT - Q2: Seens like you added a product that doesn't exist in the products table ("Pasture-raised eggs") and the DELETE clause won't work for the older same product. Please review it.
-- UPDATE - Q1: Missing the "ALTER TABLE product_units ADD current_quantity INT;", your query can't work without it. Also, you have two UPDATE clauses with some issues (check if ";" is important too) and check why your result is resulting in 0 (zero).
Final:
4 - Review the points aforementioned prior merging your feature branch assignment-two to main.
Mark: 62 points.
|
@efantinatti , thanks for review my assignment, I updated the queries related the points you highlight and push this again with some comments , I would really appreciate it if you could look into this again. |
|
Consider running your queries. This one runs into error because of a comma (query is good now but must be tested prior delivery): -- String manipulations - Q1: -- UPDATE - Q1: Still with error. Consider runningm your query prior to delivery. |
|
|
|
Hi @AbrahimSA The SQL query as written is not syntactically correct. It contains multiple issues, including duplicate SET clauses and overly complex subquery nesting that isn't properly structured, assuming you want to update product_units.current_quantity based on the most recent quantity in vendor_inventory for each product_id. Think on a simplifyed version of it. |


What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Complete assignment two
What did you learn from the changes you have made?
Very good task; it took me some time to complete.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
NA
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Yes, there were, because of complexity I had two doubts about the approach I should take
How were these changes tested?
Using SQLite
A reference to a related issue in your repository (if applicable)
Checklist