Question: Are the following 2 SQL queries equivalent, i . e . retrieve the same data? ( 2 points ) Why? What are the differences between

Are the following 2 SQL queries equivalent, i.e. retrieve the same data? (2 points) Why? What are the differences between them
First SQL Query:
SELECT customer_id, sum(purchase_price*quantity)
FROM customer
WHERE sum(purchase_price*quantity)>100
Second SQL Query
SELECT customer_id, sum(purchase_price*quantity)
FROM customer
GROUP BY customer_id
HAVING SUM(purchase_price*quantity)>100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!