We have a table of customers, there are two columns with telephone_1 and telephone_2, normally telephone_2 are used for mobile phone numbers but sometimes telephone_1 is also a mobile, and sometimes the customer has same mobile number for telephone_1 and 2
We have to find out how many customers has mobile phone. How do we do this acurately?
I have tried
select tel_1, tel_2 from customer
where tel_1 like '6%'
or tel_2 like '6%'
group by tel_1, tel_2
which gave me 48 rows back
then
select distinct tel_1 from customer
where tel_1 like '6%'
which gave me back 5 rows
select distinct tel_2 from customer
where tel_1 like '6%'
Bookmarks