Skip to content

Conversation

@myang1010
Copy link
Owner

Student Ming King.
Submit week2 assignment.

Copy link

@franchizi franchizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work again!

Join the OrderDetails and Products tables, to show a report where the columns are OrderID, ProductName, and Quantity.
Paste the SQL statement you used below.

SELECT od.OrderID, prod.ProductName, od.Quantity FROM OrderDetails od INNER JOIN Products prod ON od.ProductID = prod.ProductID;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very well done.


SELECT (e.FirstName || " " || e.LastName) AS EmployeeName, od.ProductID, od.Quantity FROM Orders o
INNER JOIN OrderDetails od ON o.OrderID = od.OrderID
INNER JOIN Employees e ON o.EmployeeID = e.EmployeeID;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very well done.

age = gets.chomp
age = age.to_i
seconds = years_to_days(age) * 24 * 60 * 60
puts "You're #{seconds} seconds old."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty well done. John mentioned that he mistakenly asked you all to worry about leap years too. So you came up with a solution to that when you shouldn't have needed too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants