London9-Hengameh-Mohammadkhani-Module-Databases - #31
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
Alexander-Rennie
left a comment
There was a problem hiding this comment.
An excellent set of answers (some minor points about style annotated below)
| ----+------------------ | ||
| 4 | Super warm socks | ||
| (1 row) | ||
| ``` |
| ----------------+---------+---------+------------ | ||
| Mobile Phone X | 4 | 1 | 249 | ||
| Mobile Phone X | 1 | 1 | 299 | ||
| (2 rows) |
There was a problem hiding this comment.
CORRECT - Minor stylistic notes: the 'AS' before the pa alias is unnecessary, and for consistency we might usually use aliases for all table names rather than just for one, but functionally this query works just fine.
| Javascript Book | 41 | ||
| Javascript Book | 40 | ||
| Javascript Book | 39 | ||
| (5 rows) |
| Super warm socks | Sainsburys | ||
| Coffee Cup | Sainsburys | ||
| Ball | Sainsburys | ||
| (9 rows) |
There was a problem hiding this comment.
CORRECT - Do note, however, that for legibility it would be preferable if you used a line feed between lines of SQL so that others can read your meaning easily - not just the compiler.
| order_id | product_id | supplier_id | quantity | ||
| ----------+------------+-------------+---------- | ||
| 4 | 1 | 1 | 1 | ||
| (1 row) |
There was a problem hiding this comment.
CORRECT - although you have not been instructed to restrict your query to order_id, product_id, supplier_id & quantity
| Super warm socks | 5 | 3 | ||
| Super warm socks | 8 | 3 | ||
| Super warm socks | 10 | 3 | ||
| (13 rows) |
There was a problem hiding this comment.
CORRECT - Again it would nice to see this without additional unnecessary text, but the SQL is right.
| Edan Higgins | ORD009 | 2019-07-24 | Ball | Sainsburys | 2 | ||
| Edan Higgins | ORD010 | 2019-05-10 | Ball | Taobao | 1 | ||
| Edan Higgins | ORD010 | 2019-05-10 | Super warm socks | Amazon | 5 | ||
| (19 rows) |








Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.