Need to find a pattern in SQL Data base and then write a query to delete the duplicate "NULL" Value I have read a lots of stuffs regarding this but cannot find solution to this problem. Please some one have a look into it.

I have a unique data-base, which contain Row-number, Year, Practice, office Statistics like details in different columns. Please find the below screen shot of it.

Here is my problem.

I need to search if the practice is unique('A', 'B'), then we don't need to do any change in the SQL Database server. However, if you find a repetitive value like in practice 'C'. Then we need to remove the Whole row from SQL database, if the Q1 , Q2 Q3, Q4 , YTD, and avg value is "NULL".

I want to remove the NULL Value if you have duplicate practice name if Q1 , Q2 Q3, Q4 , YTD, and avg value is "NULL".
Assuming your table name is tab1, this should work.

delete tab1 
from tab1 t
join (select practice from tab1
        group by practice
        having count(1)&gt;1) sub
    on t.practice=sub.practice
where q1 is null
    and q2 is null
    and q3 is null
    and q4 is null 
    and ytd is null
    and avg is null