As a way of minimizing the network and database resources required by a query, only the minimum set of data required should be selected. Thus, when a column's value is hard-coded in the ``++WHERE++`` clause, there's no need to include it in the list of selected columns. Similarly, when a column is included more than once in a ``++SELECT++`` the additional instances are clearly superfluous, as are any values in an ``++EXISTS++`` subquery ``++SELECT++`` other than 1.


== Noncompliant Code Example

----
SELECT id,   -- Noncompliant; we already know the value of id
  name,
  city,
  name  -- Noncompliant; this is the second instance of name
FROM employee
WHERE id=1

----


== Compliant Solution

----
SELECT name,
  city
FROM employee
WHERE id=1
----
or

----
SELECT 1, 
  name,
  city
FROM employee
WHERE id=1
----


