26. Refer the given tables and answer to the following questions. 1 TABLE :SUPPLIER Sup_ID S1024...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
26. Refer the given tables and answer to the following questions. 1 TABLE :SUPPLIER Sup_ID S1024 S1025 S2012 S2055 Sup_Name LULU LULU Pro_ID P1220 P1222 P1223 P1224 CARREFOUR SPAR TABLE:PRODUCT Pro_Name BUTTER MILK MUFFINS CAKE City MUSCAT BARKA BARKA MUSCAT Category DAIRY DAIRY BREAD BREAD Sup_Date 20-05-2020 01-01-2021 15-12-2019 28-09-2020 Price 50.555 20.500 35.750 25.255 Sup_ID S1024 S1024 S2012 S2055 a. Write an SQL query to display Product ID. Product Name and Number of years between sysdate and Sup Date. [Hint: Use FULL OUTER JOIN ] (2.5 Marks) b. Write an SQL query to display Sup_Name, Pro_Name from the tables SUPPLIER, PRODUCT where the Sup_date is 01-01-2021 or City is Barka. (use Natural Join) (2.5 Marks) c. Write an SQL query to display category, count price for each category where the maximum price for each group is less than 50. (2.5 Marks) d. Write an SQL query to display Sup_Name and Sup_Date of suppliers for the Product category Bread with price 25.255. [Hint: Use Subquery]. (2.5 Marks) 26. Refer the given tables and answer to the following questions. 1 TABLE :SUPPLIER Sup_ID S1024 S1025 S2012 S2055 Sup_Name LULU LULU Pro_ID P1220 P1222 P1223 P1224 CARREFOUR SPAR TABLE:PRODUCT Pro_Name BUTTER MILK MUFFINS CAKE City MUSCAT BARKA BARKA MUSCAT Category DAIRY DAIRY BREAD BREAD Sup_Date 20-05-2020 01-01-2021 15-12-2019 28-09-2020 Price 50.555 20.500 35.750 25.255 Sup_ID S1024 S1024 S2012 S2055 a. Write an SQL query to display Product ID. Product Name and Number of years between sysdate and Sup Date. [Hint: Use FULL OUTER JOIN ] (2.5 Marks) b. Write an SQL query to display Sup_Name, Pro_Name from the tables SUPPLIER, PRODUCT where the Sup_date is 01-01-2021 or City is Barka. (use Natural Join) (2.5 Marks) c. Write an SQL query to display category, count price for each category where the maximum price for each group is less than 50. (2.5 Marks) d. Write an SQL query to display Sup_Name and Sup_Date of suppliers for the Product category Bread with price 25.255. [Hint: Use Subquery]. (2.5 Marks)
Expert Answer:
Answer rating: 100% (QA)
a Write an SQL query to display Product ID Product Name and Number of years between sysdate and Sup ... View the full answer
Related Book For
Introduction to Financial Accounting
ISBN: 978-0133251036
11th edition
Authors: Charles Horngren, Gary Sundem, John Elliott, Donna Philbrick
Posted Date:
Students also viewed these computer network questions
-
On the topic: Being Super-Reasonable: Explain this term in your own words. Give a personal example of being passive aggressive. Find a quotation from the textbook, How To Improve Your Interpersonal...
-
The following information pertains to Amazon Co.'s defined benefit pension plan for 2023: Projected benefit obligation on Jan. 1, 2023.......... Interest income earned by the Pension Fund assets...
-
Refer to Table 10.1 in the text and look at the period from 1973 through 1978. a. Calculate the arithmetic average returns for common stocks and T-bills over this period. b. Calculate the standard...
-
Identify and describe a time (that you would be comfortable sharing for the purposes of this assignment) when you faced a challenge in a friendship, like a betrayal or geographic distance.
-
Carolina Designs has requested that you perform a vertical analysis of its balance sheet. Carolna Designs, Inc. Balance Sheet As of December 31 For the year (In thousands) Assets 7 Total current...
-
A compound has the empirical formula C5H12O. Upon controlled oxidation, it is converted into a compound of empirical formula C5H10O, which behaves as a ketone. Draw possible structures for the...
-
What are the differences between a breach of contract and a negligence cause of action?
-
Air France-KLM (AF), a Franco-Dutch company, prepares its financial statements according to International Financial Reporting Standards. AF's financial statements and disclosure notes for the year...
-
Solve the following exercise, using the Job Order Costing System, accounting for the following operations. Determine the unit cost of the finished production, the value of the production in process...
-
Using the 4-quarter moving average: What is the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 2. Compute the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 using exponential smoothing...
-
This figure shows a uniform electric field of E and a surface perpendicular to this field. What is the electric flux through the 5 cm by 5 cm surface? E E = 142 N/C O a. 3550.00 N m^2/C O b. 0.35 N...
-
concider a lithium - ion battery ( battery A ) that deliver's an energy of ( 5 0 wh ) . What is the Voltage al which the battery shoull be maintained duing the difctonge if it has a capacity of 2 5...
-
Please watch the following TED Talk on aging and age discrimination and respond to it. I like it because it helps to place the concept of age discrimination in the universe of the other types of...
-
First, find a current Canadian article (within 3 months ) that discusses some aspect of the impact of inflation on the economy and on our lives. You need to provide a short summary (at least three...
-
Describe the communication strategy for a different cultures and diverse group previously approved by your instructor in a 10 minute oral presentation. Your presentation must adhere to APA standards...
-
Explanation of why you have chosen this company and Why do you wish to learn more about this company's marketing channel distribution system? How would you categorize this retailer? PLEASE NOTE :...
-
The Old Flyer Bus Company has both Class A and Class B shares. The class A shares have never paid a dividend, and there is no expectation that this will change in the future. These shares have voting...
-
A copper wire (density = 8.96 g/cm 3 ) has a diameter of 0.25 mm. If a sample of this copper wire has a mass of 22 g, how long is the wire?
-
Briggs & Stratton Corporation is the worlds largest maker of air-cooled gasoline engines for outdoor power equipment. The companys engines are used by the lawn and garden equipment industry....
-
Wagner Company purchased an office building 20 years ago for $1.3 million, $500,000 of which was attributable to land. The mortgage has been fully paid. The current balance sheet follows: The company...
-
What do users learn from the statement of stockholders equity? What three types of changes are shown on the statement?
-
a. Who may bring suit under the 1934 Securities Exchange Act? b. Is the basis for action the same as in a 1933 Act suit? Explain.
-
What are the responsibilities of the plaintiff and the defendant in a 1933 Act suit?
-
Under what circumstances will a statement be presumed to be misleading?
Study smarter with the SolutionInn App