1. We have moved to a new forum! There may be a few things not working properly so please let us know if you find a bug. Remember to use the bbCode [ sql ] tag for SQL statements.

list customers with average ordered quantities?

Discussion in 'SQL - Questions and Answers' started by alexfr, May 24, 2006.

  1. alexfr New Member

    Dialect: SQL 92
    List id and name of customers who made more than 1 order, and give the average of ordered quantities
  2. alexfr New Member

    Dialect: MySQL
    SQL:

    SELECT c.nb, c.name, Avg (o.qty)
    FROM customers c, orders o
    WHERE c.nb=o.nb
    GROUP BY c.nb, c.name
    HAVING Count (*) > 1

Share This Page