MYSQL Query using subquery
        Posted  
        
            by Michael Quiles
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Michael Quiles
        
        
        
        Published on 2010-04-28T17:05:45Z
        Indexed on 
            2010/04/28
            17:13 UTC
        
        
        Read the original article
        Hit count: 205
        
mysql-query
Cant get this to work can any one help.
List the part number, part description, and on_hand value of each part whose number of units on hand is more than the average number of units onhand for all parts use a subquery?
SELECT PART_NUM, DESCRIPTION, SUM(ON_HAND * PRICE) ON_HAND_VALUE
FROM PART;
WHERE MAX(ON_HAND);
(AVG(ON_HAND) > ON_HAND);
© Stack Overflow or respective owner