Answer to Question #295153 in Python for Lovely

Question #295153

SELECT customername FROM customer c, mobile m, purchase p WHERE p.mobileidm.mobileid AND c.customerid = p.customerid AND p.customerid IN (SELECT customerid FROM purchase GROUP BY customerid HAVING #SPACE1=(SELECT #SPACE2 FROM purchase GROUP BY customerid)) AND price> 40000;




8




9




11




What should be written at #SPACE1 and #SPACE2 respectively in the query given above to get John, Jack and Maria in the output?

1
Expert's answer
2022-02-08T07:54:07-0500
SELECT customer_id,MAX(purch_amt) 
FROM orders 
WHERE customer_id BETWEEN 3002 and 3007 
GROUP BY customer_id 
HAVING MAX(purch_amt)>1000;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS