SQL Select Entire Row by Distinct Columns?

SELECT Project_Num, Title, MIN(Category) AS Category FROM MyTable GROUP BY Project_Num, Title.

If not then you could just use: SELECT DISTINCT Project_Num, Title FROM MyTable.

SELECT * FROM (SELECT DISTINCT YourDistinctField FROM YourTable) AS A CROSS APPLY ( SELECT TOP 1 * FROM YourTable B WHERE B. YourDistinctField = A. YourDistinctField ) AS NewTableName I have been trying to figure this out for hours now, I tried lots of solutions that didn't work and finally got it by searching for "joining top 1" and adapting that solution I found to a distinct search.

I need an sql statement which will allow me to select an entire row from oracle database, but by distinct columns. So each project is returned based on whether its project_num and title are unique. If a project has 2+ entries where its category is different, I need to only select that project once (it doesn't matter which entry I select for that project).

Can anyone help me please?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions