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.
-
Lone Star Meat Packers is a major processor of beef and other meat products. The company has a large amount of T-bone steak on hand, and it is trying to decide whether to sell the T-bone steaks as...
-
What are the major provisions of SOX?
-
Direct deposit both reduces the costs of and improves control over payroll dis tribution. Does this mean that companies should require all their employees to be paid by direct deposit? Why or why not?
-
For each of the following scenarios, indicate whether or not independence related SEC rules are being violated, assuming that the audit entity is a public company. Briefly explain why or why not. a....
-
Accounts receivable changes Tara's Textiles currently has credit sales of $25 million per month, an average collection period of 62 days, and bad debts equal to 4.5% of sales. Assume that the price...
-
One way to see whether this procedure will be successful is to split the original data set into two subsets: one subset for estimation and one subset for validation. A regression equation is...
-
Use the following information to answer Questions 1 to 6 (please show working) .A European call option on a non-dividend paying stock has an exercise price of $10 and six months to expiration. The...
-
What is e-mediation? What possible advantages does it offer over faceto-face mediation? What are its possible limitations?
-
Why do some people argue that mediation is not appropriate in cases where there has been domestic violence?
-
Describe the four stages of mediation (using the problem-solving).
-
You send light through a slit that is \(150 \mu \mathrm{m}\) wide. What is the wavelength of the light that you must use so that the \(n=1\) fringes are \(1.8 \mathrm{~cm}\) apart on a screen \(2.0...
-
What is an affidavit?
-
You have 30% of your investment in a stock with a beta of 1.5 and the rest in a stock with a beta of 1.1. The expected market return is 6.5% and the risk-free rate is 1%. What's the expected return...
-
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?
-
Let \(\widehat{\boldsymbol{\beta}}=\boldsymbol{A}^{+} \boldsymbol{y}\). Using the defining properties of the pseudo-inverse, show that for any \(\boldsymbol{\beta}\) \(\in \mathbb{R}^{p}\) \[...
-
Let \(\mathbf{X}\) be an \(n\)-dimensional normal random vector with mean vector \(\boldsymbol{\mu}\) and covariance matrix \(\boldsymbol{\Sigma}\), where the determinant of \(\boldsymbol{\Sigma}\)...
-
Suppose that in the polynomial regression Example 2. 1 we select the linear class of functions \(\mathscr{G}_{p}\) with \(p \geqslant 4\). Then, \(g^{*} \in \mathscr{G}_{p}\) and the approximation...
Study smarter with the SolutionInn App