title: How make query with unique?
body: <p>I have query:</p>
  
  <pre><code>SELECT TOP 20 f.id_service AS f_id_service,
                f.id_city    AS f_id_city,
                f.name       AS f_name,
                f.address    AS f_address,
                f.business   AS f_business,
                f.web        AS f_web,
                f.phone      AS f_phone,
                f.id_firm    AS f_id_firm
  FROM   Firm f
         LEFT JOIN Price p
           ON p.id_service = f.id_service
              AND p.id_city = f.id_city
              AND p.id_firm = f.id_firm
  WHERE  f.name NOT IN (SELECT DISTINCT TOP 20 f.name
                        FROM   Firm f
                        WHERE  f.blocked = '0'
                               AND ( f.name LIKE 'АВТО%'
                                      OR f.phone LIKE 'АВТО%' )
                               AND ( f.phone != ''
                                      OR f.address != '' )
                               AND f.id_city = '73041'
                        ORDER  BY f.name ASC)
         AND f.dogovor = '1'
         AND f.blocked = '0'
         AND ( f.name LIKE 'АВТО%'
                OR f.phone LIKE 'АВТО%' )
         AND ( f.phone != ''
                OR f.address != '' )
         AND f.id_city = '73041
  </code></pre>
  
  <p>Tell me please how make this query that select only unique f.name ?</p>