- or download this
select field1, count(*)
from mytable
group by field1
- or download this
select field1
from mytable l
where field2 <> '-'
order by field1, field2
- or download this
select field1, min(field2)
from mytable l
where field2 <> '-'
group by field1
order by field1, field2