Distinct on one column
becksMar 8 2010 — edited Mar 9 2010Hi,
How do i do a distinct based one one column.
NameofFile type createDate
tools shortcut 23-02-2010
source pdf 30-02-2010
dest pdf 02-01-2010
tools shortcut 03-02-2010
For example in the table above, i need to display only one file with the name tools, whichever one will do.
Select distinct NameofFile, type, createDate from filing order by NameofFile desc.
With the above sql the distinct applied to all three column. Hence how do i display all three column but only the NameofFile column will display the distinct values.
Thanks