select "Order","Mode" from your_table a where not exists(select 1 from your_table b where "Mode" not in ('T','I') and b."Order"=a."Order");