- or download this
select count(distinct hostname) as unique_hostnames,
count(*) as record_count
from my_table
where clean_hostname is null
- or download this
select hostname, count(*) cnt
from the_table
where clean_hostname is null
group by hostname
order by count(*) desc
- or download this
update my_table set clean_hostname = hostname, confidence=100.0
where hostname in ('first.correct.host', 'second.correct.host', <etc>)
or hostname like '%.mybiz.com'
or hostname like '%.joescompany.net'
- or download this
update my_table set clean_hostname = '*GARBAGE*', confidence=100.0
where hostname in ('first.correct.host', 'second.correct.host', <etc>)
or hostname like '%.spamzalot.foo'
- or download this
update my_table set clean_hostname = hostname||'houston.com', confiden
+ce=95.0
where hostname like '%.q9ix'