spool q1
set echo on
select customerID,firstName,lastname from customer;
select address1,address2,City,State,zip from customer where lastName='Simpson';
select PRODUCTID from order_item where QUANTITY>10;
select orderID,EmployeeID,orderDate,CustomerID from ORDER_ where ORDERDATE>'31-MAY-02';
select firstname,lastname from CUSTOMER where customerid in ( select customerid from ORDER_ where employeeID=3 );
select firstname,lastname from CUSTOMER where customerid in ( select customerid from ORDER_ where employeeid in ( select employeeid from employee where lastname='Williams' ) );
select count(*) from ORDER_ where customerid=1;
select count(*) from ORDER_ where customerid in ( select customerid from customer where lastname='Basinger' );
select sum(quantity) from ORDER_ITEM where productid=1;
select sum(quantity) from ORDER_ITEM where productid in ( select productid from PRODUCT where productName='Microsoft Windows 2000' );
select firstname,lastname from CUSTOMER where customerid in ( select customerid from ORDER_ where orderid in ( select orderid from ORDER_ITEM where productid in ( select productid from PRODUCT where productName='Microsoft Windows 2000' )));
select firstname,lastname from EMPLOYEE where employeeid in ( select employeeid from ORDER_ where orderid in ( select orderid from ORDER_ITEM where productid in ( select productid from PRODUCT where productName='Microsoft Windows 2000' )));

spool off
