anchor.diff:  		{
   			System.out.println("rows: user - no filters");
   			/** pulls user names, no filters**/
  -			SQL_2="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id "+ 
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 20" +"offset "+r_offset+";"; 
  -			SQL_21="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id "+ 
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 1" +"offset "+next_r_offset+";"; 
  +			SQL_2 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 20"+
  +					" OFFSET "+r_offset;
  +			SQL_21 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 1"+
  +					" OFFSET "+next_r_offset;
   		}
   		else if(selector == 10) 
   		{
   			System.out.println("rows: user - state filters");
   			/* pulls user names, state filter */ 	
  -			SQL_2="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.state='"+ state +"'" + 
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 20" +"offset "+r_offset+";"; 
  -			SQL_21="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.state='"+ state +"'" + 
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 1" +"offset "+next_r_offset+";"; 
  +		    SQL_2 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" WHERE u.state='"+ state +"'" + 
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 20"+
  +					" OFFSET "+r_offset;
  +			SQL_21 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" WHERE u.state='"+ state +"'" + 
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 1"+
  +					" OFFSET "+next_r_offset;
   		}
   		else if (selector == 01)
   		{
   			System.out.println("rows: user - age filters");
   			/* pulls user names, age filter */ 	
  -			SQL_2="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.age between " + age +  
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 20" +"offset "+r_offset+";"; 
  -			SQL_21="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.age between " + age +  
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 1" +"offset "+next_r_offset+";"; 
  +			SQL_2 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +						" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +						" WHERE u.age between " + age +  
  +						" GROUP BY u.name,u.id"+
  +						" ORDER BY u.name ASC LIMIT 20"+
  +						" OFFSET "+r_offset;
  +			SQL_21 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" WHERE u.age between " + age +  
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 1"+
  +					" OFFSET "+next_r_offset;
   		}
   		else if (selector == 00)
   		{
   			System.out.println("rows: user - age and state filters");
   			/* pulls user names, age and state filter */ 	
  -			SQL_2="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.age between " + age + " AND u.state='"+ state +"'" +
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 20" +"offset "+r_offset+";"; 
  -			SQL_21="select  u.name, sum(s.quantity*s.price) as amount from users u, sales s,  products p "+
  -					  "where s.uid=u.id and s.pid=p.id AND u.age between " + age + " AND u.state='"+ state +"'" +
  -					  "group by u.name "+ 
  -					  "order by u.name asc "+
  -					  "limit 1" +"offset "+next_r_offset+";"; 
  +		   SQL_2 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" WHERE u.age between " + age + " AND u.state='"+ state +"'" +
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 20"+
  +					" OFFSET "+r_offset;
  +					  
  +		   SQL_2 ="SELECT u.id, u.name, SUM(s.quantity*s.price) AS amount"+
  +					" FROM users u LEFT JOIN sales s ON s.uid = u.id"+
  +					" WHERE u.age between " + age + " AND u.state='"+ state +"'" +
  +					" GROUP BY u.name,u.id"+
  +					" ORDER BY u.name ASC LIMIT 1"+
  +					" OFFSET "+next_r_offset;
   		}
   	}
   	
   	/* Determine if there are more rows and columns */
  -	Statement stmt_11 =conn.createStatement();
  +	Statement stmt_11 =conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   	ResultSet rs_11=stmt_11.executeQuery(SQL_11);
   	boolean moreColumns = false;
   	while(rs_11.next())
   	{
   		moreColumns = true;
   	}
  -	Statement stmt_21 =conn.createStatement();
  +	Statement stmt_21 =conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
   	ResultSet rs_21=stmt_21.executeQuery(SQL_21);
   	boolean moreRows = false;
   	while(rs_21.next())
  
positive.code: 		<form class="navbar-form navbar-left" role="search" action="analytics.jsp" method="GET">
  		<div class="col-sm-12">
  				<select class="form-control" name="scope" <%= disabled %>>
  					<option value="states">States</option>
  		        	<option value="customers">Customers</option>
  		        </select>
  
  		        <select class="form-control" name="ages" <%= disabled %>>
  
negative.code: 	String SQL_11 = null;
  	String SQL_21 = null;
  	
  	String SQL_3 = null;
  	
  	if(category == null || category.equals("all") || category.equals("null"))
  	{
  		System.out.println("columns: product - no filters");
  		/** pulls product names, no filters**/
  		SQL_1 ="SELECT p.id, p.name, SUM(s.quantity*s.price) AS amount" +
  			" FROM products p" +
  			" LEFT JOIN sales s" + 
  			" ON s.pid = p.id" +
  			" GROUP BY p.name,p.id" + 
  			" ORDER BY p.name ASC" +
  			" LIMIT 10 OFFSET "+c_offset;
  		SQL_11="SELECT p.id, p.name, SUM(s.quantity*s.price) AS amount" +
  				" FROM products p" +
  				" LEFT JOIN sales s" + 
  				" ON s.pid = p.id" +
  				" GROUP BY p.name,p.id" + 
  				" ORDER BY p.name ASC" +
  				" LIMIT 1 OFFSET "+next_c_offset;
  	}
  	else
  	{
  		System.out.println("columns: product - category filters");
  		/** pulls product names, category filter**/		 
  		 SQL_1 ="SELECT p.id, p.name, SUM(s.quantity*s.price) AS amount" +
  					" FROM products p" +
  					" LEFT JOIN sales s" + 
  					" ON s.pid = p.id" +
  					" WHERE p.cid='"+ category +"'" +
  					" GROUP BY p.name,p.id" + 
  					" ORDER BY p.name ASC" +
  					" LIMIT 10 OFFSET "+c_offset;
  		 SQL_11 ="SELECT p.id, p.name, SUM(s.quantity*s.price) AS amount" +
  					" FROM products p" +
  					" LEFT JOIN sales s" + 
  					" ON s.pid = p.id" +
  					" WHERE p.cid='"+ category +"'" +
  					" GROUP BY p.name,p.id" + 
  					" ORDER BY p.name ASC" +
  					" LIMIT 1 OFFSET "+next_c_offset;
  	}			
  	
  	
  