# Miscellaneous > Database Design >  doing a DISTINCT for one column only, possible?

## Lou Thompson

How can I do a DISTINCT on one column only, within a 4 level JOIN ?

Here&#39;s the example;

One of the tables I&#39;m joining is called &#39;seasons&#39; with 3 columns: &#39;season&#39; &#39;start_date&#39; &#39;end_date&#39;.

In the main table there is a column &#39;season&#39; where the value is either &#39;basic&#39;, &#39;shoulder&#39; or &#39;peak&#39;.

In the &#39;seasons&#39; table, the &#39;season&#39; column is also one of the 3 mentioned season types. However, there is usually more than one line for the same season but with different date periods.

Now when I use this query that I created with Access, it retrieves the same record from the &#39;main&#39; table multiple times! I now figured out it&#39;s because it&#39;s counting how many season periods there are, even though they&#39;re all with the same season type...

----------


## Sumit

Instead of directly using Seasons table in the Join, create a Query first to select distinct seasons from the Season table and then use this Query in your main query join.

------------
Lou Thompson at 5/12/01 10:46:41 PM

How can I do a DISTINCT on one column only, within a 4 level JOIN ?

Here&#39;s the example;

One of the tables I&#39;m joining is called &#39;seasons&#39; with 3 columns: &#39;season&#39; &#39;start_date&#39; &#39;end_date&#39;.

In the main table there is a column &#39;season&#39; where the value is either &#39;basic&#39;, &#39;shoulder&#39; or &#39;peak&#39;.

In the &#39;seasons&#39; table, the &#39;season&#39; column is also one of the 3 mentioned season types. However, there is usually more than one line for the same season but with different date periods.

Now when I use this query that I created with Access, it retrieves the same record from the &#39;main&#39; table multiple times! I now figured out it&#39;s because it&#39;s counting how many season periods there are, even though they&#39;re all with the same season type...

----------

