greetings,
given the following data
declare @cats table(type char(10), color char(1))
insert into @cats
select 'abyssinian', 'B' union all
select 'abyssinian', 'B' union all
select 'abyssinian', 'B' union all
select 'abyssinian', 'B' union all
select 'abyssinian', 'A' union all
select 'abyssinian', 'C' union all
select 'Dog', 'C' union all
select 'Dog', 'A' union all
select 'Dog', 'A' union all
select 'Dog', 'A' union all
select 'Dog', 'A' union all
select 'Dog', 'A' union all
select 'Dog', 'B' union all
select 'Dog', 'C'
how can I get the top ranking value by type please?
- 'abyssinian', 'B'
- 'Dog', 'A'