How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
3546829
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

I have several problems to solve mostly practice, will you

Customer Question

I have several problems to solve mostly practice, will you be willing to help, I would also like an explanation in order to better understand
Submitted: 1 year ago.
Category: Homework
Expert:  LogicPro replied 1 year ago.

Hi

Welcome

Thank you for asking me

Yes, I can help and explain.

provide the details

Customer: replied 1 year ago.
Problem 11
Show the First Name, Last Name, OrderNumber and OrderDate for all Customers even if they do not have any orders.
Hint: The information for this query is in the Customer and Sales Order tables. Use a JOIN on these two tables. The "common column" is SalesOrderNumber. To get all Customers, use a LEFT JOIN.Select c.FirstName,c.LastName,o.OrderNumber , o.OrderDate from Customer c
left join SalesOrder o on o.SalesOrderNumber = c.SalesOrderNumber;Problem 12
Show the first and last names of the customer as one column, and the City and State separated by a comma as one column. Order by the state, the city and the customer's last name.
Hint: To concatenate columns, use the '+' key, e.g., AreaCode + '-' + PhoneNumber.Problem 13
For each part, show the Sales Orders that sold that part. Show the Parts that have no sales as well. Display the PartID, Part Name, Sales Order #, the Quantity sold and the price for the order.
Hint: A Left Join returns everything already selected even if it doesn't match the tables following. An Inner Join only returns those rows that match the condition in both tables. A Right Join is the opposite of a Left Join: It returns rows in every table AFTER the join even if the previous rows are not matched.Problem 14
For each Part, show the PartID, Part Name, Total Quantity sold and the total sales, including Parts with no sales. Order by the quantity sold descending, then by the name of the part.
Hint: Aggregrate columns return results based on "groups" of rows. If you select a non-aggregrate column, your query must GROUP BY those non-aggregrate columns. To convert NULL to 0, use IsNull(column name, 0), for example IsNull(OrderCost, 0).
Problem 15
For each Sales Order, show how many days it took to ship the order in order by the longest order, then by Sales Order Number. Display Sales Order Number and the number of days to ship. Include the orders that have not yet shipped.
Hint: Look at the DATEDIFF function to return the difference between two dates. The two dates in this problem are the Order Date and the Shipment Date.Problem 16
Show the orders that are partial shipments meaning that the quantity shipped is less than the quantity ordered. Display the SalesOrderNumber, PartID, Quantity Ordered and the Quantity Shipped in order by SalesOrderNumber, PartID.
Hint: All of this information comes from two tables: SalesOrderPart and ShipmentPart. Use the WHERE statement to find the rows where the SalesOrderPart Quantity is greater than (use '>') the the ShipmentPart Quantity.Problem 17
Show the Parts that were returned. Display the name of the part, the date it was returned and the reason.
Hint: This simple sounding query requires several tables joined together. Start with the SalesReturn table and trace the path to the Part table, joining the tables along the way. There are four tables.Problem 18
Show the total sales by year. Display the year and the total sales. Sort by year.
Hint: Try using the YEAR( some date ) function and the SUM( some column ) aggregate function. Don't forget your GROUP BY. Note that YEAR( some date ) is a function and not an aggregate meaning that it must be in the GROUP BY expression.
Expert:  LogicPro replied 1 year ago.

Provide the table structures also with data

Customer: replied 1 year ago.
No I have no time to chat please sent the answers with explanation, if that is a problem send answer and I'll figure it out but thank you for your help.
Expert:  LogicPro replied 1 year ago.

I can help you using remote desktop and I can provide explanation too.

Without knowing the table structures, queries cannot be written. Let me know if you have time for remote session

Customer: replied 1 year ago.
No please send the answer, I will go over it with my instructor, please send the answers
Customer: replied 1 year ago.
I have sent you the hints on how he wants it done, it is with every question.
Expert:  LogicPro replied 1 year ago.

Friend, you are asking for impossible. Until you provide the table structures, how can the queries be written?

Customer: replied 1 year ago.
Select
From
Where
Expert:  LogicPro replied 1 year ago.

There are queries which need table structure

Customer: replied 1 year ago.
This is the beginning ones I did it. The next that I sent you are a little intermediate, I just starting this. I don't know what the problem is.The set I sent you have everything, the explanation of what is ask for.
SELECT CustomerId ,COUNT(CustomerId)
FROM SalesOrder GROUP BY CustomerId HAVING COUNT(CustomerId) > 1
ORDER BY COUNT(CustomerId)
Expert:  LogicPro replied 1 year ago.

Sorry friend, there are about 8 queries. I cannot write them by guessing the table names and column names. I am opting out for others to answer. Thank you asking me. I would help you with other questions though.

Customer: replied 1 year ago.
I sorry to, I'm on the phone with my bank to opt out of paying you.