Question: 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

1 Expert Approved Answer
Step: 1 Unlock

Answer Where clause SELECT Region SUMRevenue AS TotalRevenue FROM Sales WHERE ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!