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 from particular customers with minum orders?

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

  1. alexfr New Member

    Dialect: SQL 92
    Ascending list of wine name, wine year and ordered quantity for all ordered wines by customers located in Paris and who ordered more than 100 bottles
  2. alexfr New Member

    Dialect: SQL 92
    SQL:

    SELECT w.name, w.year, Sum(o.qty)
    FROM customers c, orders o, wines w
    WHERE c.nb=o.nb AND o.nv=w.nv
    AND c.town='Paris'
    GROUP BY w.name, w.year
    HAVING Sum(o.qty) > 100
    ORDER BY w.name, w.year

Share This Page