Armita Kharmandar Assignment 1-1 (pdf) and 1-2 (sql) compeleted#1
Armita Kharmandar Assignment 1-1 (pdf) and 1-2 (sql) compeleted#1kharmandara wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
The direction of relationship between vendor and customer-purchase look reversed. There should be one unique vendor_id in the vendor table, but many vendor_id in the customer_purchases table. Same case for the relationship between vendor and vendor_inventory table. And, for the second table, we don't indicate relationship between the same table 'booth'
| SELECT product_id, product_name, | ||
|
|
||
| CASE | ||
| WHEN product_qty_type LIKE '%unit%' |
There was a problem hiding this comment.
This may classify any word containing "unit". Consider CASE WHEN product_qty_type = 'unit'
| END AS prod_qty_type_condensed, | ||
|
|
||
| CASE | ||
| WHEN product_name LIKE '%pepper%' |
There was a problem hiding this comment.
LIKE '%pepper%' -- this will not match "Pepper" or "PEPPER". Consider using LOWER(...) LIKE '...'
| SELECT vendor_id, COUNT(booth_number) as vendor_rent_time, booth_number | ||
|
|
||
| FROM vendor_booth_assignments | ||
| GROUP BY vendor_id, booth_number; |
There was a problem hiding this comment.
You may leave out the group by booth_umeber. Grouped by booth_number -- this output counts per booth, not per vendor.
I am so sorry for late reply. I wonder if it is fine amending these feedbacks after finishing assignment 2 as I am a bit behind . |
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Answering assignment -1 (pdf) and 1-2 (sql)
What did you learn from the changes you have made?
how to query different tables and analyze them.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
No.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
opening the database in SQLite. but it came out an issue from the original file so the instructor fixed it and I pull the changes/ updated file and I was able to open the database.
How were these changes tested?
running the queries properly in SQLite.
A reference to a related issue in your repository (if applicable)
Checklist