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 all customers from table customers that haven't made any order during year 2005?

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

  1. alexfr New Member

    Dialect: MySQL
    List all customers from table customers that haven't made any order during year 2005
  2. alexfr New Member

    Dialect: MySQL
    SQL:
    SELECT c.firstname, c.lastname, c.address FROM customers c 
    WHERE c.id NOT IN (SELECT o.customer_id FROM orders o WHERE year(o.order_date) = 2005)

Share This Page