Question

List of all information about ingredients purchased, sorted by date ordered. Include the ingredient name (Hint:...

  1. List of all information about ingredients purchased, sorted by date ordered. Include the ingredient name (Hint: use a join)

Dont' get it what's wrong...

SELECT ingredient_name, date_ordered, quantity, unit, unit_price
FROM ingredient INNER JOIN ingredient_purchase_list ON ingredient_id = ingredient_id
ORDER BY date_ordered;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SELECT ingredient_name, date_ordered, quantity, unit, unit_price
FROM ingredient i1 INNER JOIN ingredient_purchase_list i2 ON i1.ingredient_id = i2.ingredient_id
ORDER BY date_ordered;

we should use the alias names when we have the same column name in the both tables

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
List of all information about ingredients purchased, sorted by date ordered. Include the ingredient name (Hint:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • List the ingredient id, name, date ordered, quantity & unit (in one column) for all ingredients,...

    List the ingredient id, name, date ordered, quantity & unit (in one column) for all ingredients, even if the ingredient has not been ordered (Hint: use outer join) SELECT ingredient_id, ingredient_name, date_ordered, CONCAT(quantity, unit) AS "Quantity & Unit" FROM ingredient ing LEFT OUTER JOIN ingredient_purchase_list ing2 ON ing.ingredient_id = ing2.ingredient_id ORDER BY ingredient_id; (It says column ambiguosly defined)

  • All ingredients purchased in November. Display the ingredient id, name, date ordered, quantity & unit (in...

    All ingredients purchased in November. Display the ingredient id, name, date ordered, quantity & unit (in one column), unit price, and total amount for each item. Order the result set by descending date ordered. Hint: total amount is quantity multiplied by unit price. (ORA-00904: "MONTH": invalid identifier) SELECT ingredient_id, ingredient_name, date_ordered, "Quantity & Unit" AS Quantity, unit_price * quantity AS "Total Amount" FROM ingredient WHERE month('date_ordered') = 11 ORDER BY 'date_ordered' DESC;

  • 25. The president of the company wants a list of all orders ever taken. He wants...

    25. The president of the company wants a list of all orders ever taken. He wants to see the customer name, the last name of the employee who took the order, the shipper who shipped the order, the product that was ordered, the quantity that was ordered, and the date on which the order was placed. [Hint: You will need to join the following tables: Customers, Employees, Shippers, Orders, OrderDetails, Products, and to get all of the necessary information.] attempted...

  • Use SQL to slove the problem 1. (7) List all condos in building C, the date...

    Use SQL to slove the problem 1. (7) List all condos in building C, the date they were cleaned, and the full name of the staff who cleaned them in August. 2. (5) Display the activities reserved in June for more than 3 people. Include the activity description and label the output as Activities Reserved in June. 3. (4) Listing for all guides and their certification renewal dates for next year. Include full name and hire date. 4. (6) Management...

  • If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top o...

    If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...

  • 1,List the first and last name of the donators that donated in December 2009. 2. List...

    1,List the first and last name of the donators that donated in December 2009. 2. List the ID's of the volunteers that have not worked. 3. List the ID, first name, and last name of any employees who works in the Finance department. 4. List all the different prices suppliers have for 'Tasty Meat' product. 5. Select the store ID and store phone number for all stores in 'St.Paul'. 6. List the member first and last name, address, city, zip...

  • This is all of the information I have: Now that you have reviewed information about Cover...

    This is all of the information I have: Now that you have reviewed information about Cover 2 Cover, you are ready to begin the first step in the accounting cycle, recording transactions. On this page of the practice set, you are asked to record transactions that occurred during the first week of June into the company's journals and post the appropriate entries to the ledger accounts. The following transactions occurred throughout the first week of June: Week 1 Date Transaction...

  • This is all of the information I have: Now that you have reviewed information about Cover...

    This is all of the information I have: Now that you have reviewed information about Cover 2 Cover, you are ready to begin the first step in the accounting cycle, recording transactions. On this page of the practice set, you are asked to record transactions that occurred during the first week of June into the company's journals and post the appropriate entries to the ledger accounts. The following transactions occurred throughout the first week of June: Week 1 Date Transaction...

  • For C++ This is the information about the meal class 2-1. (24 marks) Define and implement...

    For C++ This is the information about the meal class 2-1. (24 marks) Define and implement a class named Dessert, which represents a special kind of Meal. It is to be defined by inheriting from the Meal class. The Dessert class has the following constructor: Dessert (string n, int co) // creates a meal with name n, whose type // is "dessert" and cost is co The class must have a private static attribute static int nextID ; which is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT