title: SQL join: avoid duplicate entries while joining two tables?
body: <p>I have two tables, A and B, and I am trying to select rows from A based on a join query.
  I am getting some records from these tables, but there are some duplicate entries.  How should I filter this query to avoid duplicate rows? For now, I'm doing it via Java code by putting these into a HashSet.</p>