Write SQL statements for the following queries. 1) Retrieve all names of products that were purchased...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write SQL statements for the following queries. 1) Retrieve all names of products that were purchased by 'Kailani Benham' on 29-03- 23 at the store located at '22100 FI-7, Boca Raton, Fl 33428'. 2) Retrieve the ids and the first and last names of employees who have no supervisor and are older than 80. 3) Retrieve the ids and the first and last names of customers who purchase the 'Seasense Rope Ladder' product. 4) Retrieve the ids and the first and last names of customers who purchase no item. 5) Retrieve the ids and the first and last names of customers who purchase 'Seasense Rope Ladder' or 'Sloth Face Ice Hockey Puck' products. 6) Retrieve the ids and the first and last names of customers who purchase both 'Seasense Rope Ladder' and 'Sloth Face Ice Hockey Puck' products. 7) Retrieve the first and last names of the oldest customers whose salary is greater than 400000. 8) Retrieve the names of brands whose brand value is greater than 98 and contains more than 10 products. 9) Retrieve the first and last names of customers who purchase and return the same item on the same date. 10) Retrieve the first and last names of customers who purchases all items of the 'QTees Hemmed Fingertip Towel' product. REFUND CD INTEGER PD INTEGER INTEGER NO RDATE DATE PURCHASE CD INTEGER ED INTEGER PID INTEGER INTEGER NO PDATE DATE CUSTOMER D INTEGER FNAME VARCHAR2(20) LNAME VARCHAR2(20) AGE INTEGER SALARY INTEGER ITEM PID INTEGER NO INTEGER SID INTEGER PRODUCTCATEGORY PD INTEGER CAT_ID INTEGER > EMPLOYEE D INTEGER FNAME VARCHAR2(20) INAME VARCHAR2(20) AGE INTEGER SUP EID INTEGER STORE D INTEGER ADDRESS VARCHAR2(50) PRODUCT D NAME VARCHAR2(210) PRICE NUMBER BID INTEGER INTEGER CATEGORY D INTEGER NAME VARCHAR2(90) " BRAND INTEGER VARCHAR2(70) NAME BRAND_VALUE INTEGER Write SQL statements for the following queries. 1) Retrieve all names of products that were purchased by 'Kailani Benham' on 29-03- 23 at the store located at '22100 FI-7, Boca Raton, Fl 33428'. 2) Retrieve the ids and the first and last names of employees who have no supervisor and are older than 80. 3) Retrieve the ids and the first and last names of customers who purchase the 'Seasense Rope Ladder' product. 4) Retrieve the ids and the first and last names of customers who purchase no item. 5) Retrieve the ids and the first and last names of customers who purchase 'Seasense Rope Ladder' or 'Sloth Face Ice Hockey Puck' products. 6) Retrieve the ids and the first and last names of customers who purchase both 'Seasense Rope Ladder' and 'Sloth Face Ice Hockey Puck' products. 7) Retrieve the first and last names of the oldest customers whose salary is greater than 400000. 8) Retrieve the names of brands whose brand value is greater than 98 and contains more than 10 products. 9) Retrieve the first and last names of customers who purchase and return the same item on the same date. 10) Retrieve the first and last names of customers who purchases all items of the 'QTees Hemmed Fingertip Towel' product. REFUND CD INTEGER PD INTEGER INTEGER NO RDATE DATE PURCHASE CD INTEGER ED INTEGER PID INTEGER INTEGER NO PDATE DATE CUSTOMER D INTEGER FNAME VARCHAR2(20) LNAME VARCHAR2(20) AGE INTEGER SALARY INTEGER ITEM PID INTEGER NO INTEGER SID INTEGER PRODUCTCATEGORY PD INTEGER CAT_ID INTEGER > EMPLOYEE D INTEGER FNAME VARCHAR2(20) INAME VARCHAR2(20) AGE INTEGER SUP EID INTEGER STORE D INTEGER ADDRESS VARCHAR2(50) PRODUCT D NAME VARCHAR2(210) PRICE NUMBER BID INTEGER INTEGER CATEGORY D INTEGER NAME VARCHAR2(90) " BRAND INTEGER VARCHAR2(70) NAME BRAND_VALUE INTEGER
Expert Answer:
Answer rating: 100% (QA)
Answer step 1 SELECT Pproductname FROM Products P JOIN Orders O ON Pproductid O... View the full answer
Related Book For
South Western Federal Taxation 2023 Comprehensive Volume
ISBN: 9780357719688
46th Edition
Authors: Annette Nellen, Andrew D. Cuccia, Mark Persellin, James C. Young
Posted Date:
Students also viewed these databases questions
-
1. Write a function with the prototype function r secant (f, x0, x1, tol, kmax) which implements the secant method to find a root of a function f between x0 and x1. Successive estimates are...
-
Identify two risks of using debt financing for a small business. Identify one benefit of using debt financing for a small business. Describe a bank's information requirements from a business seeking...
-
An 8-pole trapezoidal BLDCM is driven round at a speed of 1000 rpm and the measured open-circuit line voltage is 20 V. The phase resistance is 1 Ohm and the rated motor current is 5A. The motor is...
-
solve the following instance of the 0/1 kropsack problem using dynamic programming approach. Assume that the knapsack capacity is 9. Item 1 3 4 weight 6 2 5 7 Benef $8 $4 $6 $10
-
A small body of mass m is fixed to the middle of a stretched string of length 2l. In the equilibrium position the string tension is equal to To. Find the angular frequency of small oscillations of...
-
which is effective for engaging national debates and dialogues, traditional media or new media?
-
What are the four concepts that are essential to the extended object-oriented approach to software development?
-
Using the legend provided, classify each of the following citations as to the location. A citation may have more than one answer. a. 61(a)(13). b. Prop.Reg. 1.3682(b)(1). c. Rev.Proc. 7737, 19772...
-
Jeanne is currently taking the college course "Intro to Biology". The instructor often gives quizes. Of the past five quizzes, Jeanne got the following scores: 16 10 9 14 12. Find the standard...
-
A nutrition plan app has a subscription that costs $10/month. The following chart gives average historical renewal rates for subscribers based on how many months they have been a subscriber. Month 1...
-
Our client, Chris Huber, owns 500 shares of Pear Inc. stock with an adjusted basis of $22,000. He is planning to sell 100 shares on July 28, 2020 for $3,000 to pay for the bar at his daughters...
-
Take a moment to think about someone whom you view as a bad presenter. What are the qualities of this persons verbal and nonverbal communication while presenting? Does this speaker neglect to...
-
How does a bankrupt become discharged?
-
How do you manage stress and emotions such as anger? What strategies do you have, if any, that work for you?
-
What test does a court apply to determine if a privacy-invasive activity is reasonable?
-
What federal legislation protects personal information held in the private sector, and what does this statute require businesses to do?
-
Difference between OSI and TCP/IP model.
-
Find the market equilibrium point for the following demand and supply functions. Demand: 2p = - q + 56 Supply: 3p - q = 34
-
In 2022, Robert takes four key clients and their spouses out to dinner at a local restaurant. Business discussions occurred over dinner. Expenses were $700 (drinks and dinner) and $140 (tips to...
-
Jorge owns two passive investments, Activity A and Activity B. He plans to dispose of Activity A in the current year or next year. Juanita has offered to buy Activity A this year for an amount that...
-
Miguel receives tangible personal property as an inheritance in 2020. The property was depreciated by the deceased (Miguels father), and Miguel will also depreciate it. At the date of the deceaseds...
-
A typical timber wolf has a mass of \(40 \mathrm{~kg}\), a typical jackrabbit a mass of \(2.5 \mathrm{~kg}\). Given the scaling law presented in the passage, we'd expect the specific metabolic rate...
-
A standard gold bar stored at Fort Knox, Kentucky, is 7.00 inches long, 3.63 inches wide, and 1.75 inches tall. Gold has a density of \(19,300 \mathrm{~kg} / \mathrm{m}^{3}\). What is the mass of...
-
A typical timber wolf has a mass of \(40 \mathrm{~kg}\), a typical jackrabbit a mass of \(2.5 \mathrm{~kg}\). Given the scaling law presented in the passage, we'd expect the wolf to use times more...
Study smarter with the SolutionInn App