title: How do I write a nested query to display the customer names and credit limit with a lower credit limit than the customer in cit in same table?
body: <p>The following is my CUSTOMERS table:</p>
  
  <pre><code>create table CUSTOMERS
      (CustID      char(6)       unique Not null,
       Name        varchar(45),
       Address     varchar(40),
       City        varchar(30),
       State       varchar(2),
       Zip         varchar(9),
       AreaCode    char(3),
       Phone       varchar (9),
       RepID       char(4)       not null,
       CreditLimit decimal(9,2),
       Primary key(CustID),
           Foreign key(RepID) References EMPLOYEES(EmpID));
  
  
  
  
  insert into CUSTOMERS values (100,'Jocksports','345 Viewridge','Belmont','CA','96711',415,'598-6609',7844,5000);
  insert into CUSTOMERS values (101,'TKB Sport Shop','490 Boli Rd.','Redwood City','CA','94061',415,'368-1223',7521,10000);
  insert into CUSTOMERS values (102,'Vollyrite','9722 Hamilton','Burlingame','CA','95133',415,'644-3341',7654,7000);
  insert into CUSTOMERS values (103,'Just Tennis','Hillview Mall','Burlingame','CA','97544',415,'677-9312',7521,3000);
  insert into CUSTOMERS values (104,'Every Mountain','574 Surry Rd.','Cupertino','CA','93301',408,'996-2323',7499,10000);
  insert into CUSTOMERS values (105,'K + T Sports','3476 El Paseo','Santa Clara','CA','91003',408,'376-9966',7844,5000);
  insert into CUSTOMERS values (106,'Shape Up','908 Sequoia','Palo Alto','CA','94301',415,'364-9777',7521,6000);
  insert into CUSTOMERS values (107,'Womens Sports','Valco Village','Sunnyvale','CA','93301',408,'967-4398',7499,10000);
  insert into CUSTOMERS values (108,'North Woods Fitness Supply Center','98 Lone Pine Way','Hibbing','MN','55649',612,'566-9123',7844,8000);
  </code></pre>
  
  <p>The following is my query I need amended:</p>
  
  <pre><code>select name, creditlimit
  from CUSTOMERS
  where name in
  (select name
  from CUSTOMERS
  where City = 'sunnyvale');
  </code></pre>
  
  <p>I can't find examples anywhere to answer the following prompt:</p>
  
  <p>Write the nested query to display the customer names and credit limit with a lower credit limit than the customer in Sunnyvale. List lowest credit limit first.</p>