@Rajeev KR thanks for providing the clue.
table:not(:has(thead>tr))>tbody>tr:first-child, table:has(thead>tr)>thead>tr:first-child