• kavern (9/19/2012)


    That is assuming i know all the products and i can type one at a time. I was just giving an example on how the table data will look like which will have many data.

    Is there other query without hard coding the query?

    Lowell's CTE is simply a way for him to provide test data for the actual query. Substitute your actual table for his CTE in the select part of the query.

    select Product, MIN(status)

    FROM yourTable

    GROUP BY Product