SQL: SELECT id, sid, category FROM categories WHERE sid IS NULL OR id = Software ORDER BY id, sid