Question: i an trying to get values from table using DISTINCT but this is not working, here is wt i am doing

```
SELECT top100albums.songs, english_fm.artist, 
    english_fm.album, english_fm.image
FROM top100albums, english_fm
WHERE top100albums.songs = english_fm.album

```

i am confused how can i use DISTINCT in this query can i use it like this ...

```
 SELECT  top100albums.songs, english_fm.DISTINCT(artist), 
     english_fm.DISTINCT(album), english_fm.DISTINCT(image)
 FROM top100albums, english_fm
 WHERE top100albums.songs = english_fm.album

```

this is wrong ...

i want to get DISTINCT (not repeated result of these rows artist,album,image from table english\_fm, so how can i do that

Answer: 
This is fully optimized query with needed result.

Try this

```
SELECT ta.songs, ef.artist, ef.album, ef.image
FROM english_fm AS ef
INNER JOIN top100albums AS ta ON ef.album = ta.songs
GROUP BY ef.artist, ef.album, ef.image;

```

Hope, this will helpful
`DISTINCT` applies for the rows and not for individual columns.

So use `GROUP BY' for your requirement.

```
SELECT top100albums.songs, english_fm.artist, english_fm.album), english_fm.image
 FROM top100albums, english_fm
 WHERE top100albums.songs = english_fm.album GROUP BY english_fm.artist, english_fm.album, english_fm.image;

```