Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SELECT query, what is the difference between a WHERE clause and a HAVING clause? Give a complete SQL Oracle code example of

SELECT query, what is the difference between a WHERE clause and a HAVING clause? Give a complete SQL Oracle     

   code example of each that is different from what is in the book and explain each showing result with data. 

 

2. What is the difference between the COUNT aggregate function and the SUM aggregate function?  Explain using complete          SQL Oracle code examples that are different from the book and explain each showing result with data. 

 

3. Rewrite the following SQL Oracle WHERE clause without the use of the IN keyword.  Is there more than one way to rewrite        it?  If so, provide the complete Oracle SQL code for all possibilities (there are several).

                WHERE V_STATE IN ('OH', 'FL', 'PA')

 

4. Explain the difference between an ORDER BY clause and a GROUP BY clause.  Give a complete SQL Oracle code example 

     of each that is not in the book and explain how that differ showing result with data.

 

5. Explain why the two following SQL Oracle code commands produce different results. Make up some data and explain 

     thoroughly how different in your example.

        SELECT DISTINCT COUNT (P_CODE) FROM PRODUCT;

              SELECT COUNT (DISTINCT P_CODE) FROM PRODUCT;

 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Answer Where clause SELECT Region SUMRevenue AS TotalRevenue FROM Sales WHERE ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation and Management

Authors: Carlos Coronel, Steven Morris

11th edition

9781305323230, 1285196147, 1305323238, 978-1285196145

Students also viewed these Databases questions