My above query prioritizes the Activation column. Keep (in order) 1, 0 and NULL.If there is a row with 1 for Activation, the code will keep that row and omit other 1 rows and 0 rows and NULL rows.If there are no rows with 1, then the code keep the zero row and omit other zero rows and NULL rows.If there are no rows with 0, then the code keep the NULL row and omit other NULL rows.