MySQL Forums
Forum List  »  Quality Assurance

Re: Why subquery?
Posted by: Alexander Keremidarski
Date: April 16, 2007 09:00AM

Aggregate functions can be sued in expressions in SELECT part so the following one is legal SQL:

SELECT c, MIN(i) - MAX(i) AS min_minus_max FROM foo GROUP BY c;

Options: ReplyQuote


Subject
Views
Written By
Posted
4017
April 10, 2007 01:18AM
2635
April 10, 2007 04:08AM
2747
April 10, 2007 12:05PM
2807
April 11, 2007 02:56AM
Re: Why subquery?
4053
April 16, 2007 09:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.