var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Getting records that only exist once.
Heres one that I'm too dumb to fathom out - have spent hours on it so any help would be greatly received :-)
I have a database that lists company names. What I need to do is only select those companies that appear in the table once. - bear in mind a distinct wont work for this.
So far I have tried this:
select total,num_dels,company from nominput where (select count(company) from nominput) = 1
But this doesn't return a thing - is this the right way to do it ?
where company in
( select company
group by company
having count(*) = 1 )
Many thanks - works great :-)
I guess I need to do some more reading up on group by, I dont understand why it works but it does so thanks very much, greatly appreciated.