Dear All, i would like to get different result from 1 column in 1 query. the details result is below database name: Datatable name: table1column: id, phoneno, timeframe, mo if MO=1 means MO else MO=0 means MT my query: use dataselect phoneno, sum(mo) as mo from table1 where mo=''1'' and mo=''0'' and timeframe>''20080110'' and timeframe<''20080111'' 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 think you''re looking for CASE Function -- CK 这篇关于从1个查询中的1列获得不同的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 21:02