Dear All,
i would like to get different result from 1 column in 1 query. the details result is below
database name: Data
table name: table1
column: id, phoneno, timeframe, mo
if MO=1 means MO else MO=0 means MT
my query:
use data
select phoneno, sum(mo) as mo from table1 where mo='1' and mo='0' and timeframe>'2008 0110' and timeframe<'2008 0111'
my result:
i get the mo result is 0
expecting result:
1st column is phoneno, 2nd is mo where mo=1, 3rd is mt where mo=0
very much apreciate if you could provide me the right query.
Many Thanks
warmest regards,
Nicholas
i would like to get different result from 1 column in 1 query. the details result is below
database name: Data
table name: table1
column: id, phoneno, timeframe, mo
if MO=1 means MO else MO=0 means MT
my query:
use data
select phoneno, sum(mo) as mo from table1 where mo='1' and mo='0' and timeframe>'2008 0110' and timeframe<'2008 0111'
my result:
i get the mo result is 0
expecting result:
1st column is phoneno, 2nd is mo where mo=1, 3rd is mt where mo=0
very much apreciate if you could provide me the right query.
Many Thanks
warmest regards,
Nicholas
Comment