asp.net - Sum of two columns in mysql -


i working in crystal report , generating performance based report. query

select mguser.userid, mguser.username loger,date_format(trschedule.insdate,'%y-%m-%d') _date, count(distinct trschedule.scheduleid) schedule_count, count(*) segment_count mguser 

i want summation of these 2 columns--- count(distinct trschedule.scheduleid) schedule_count, count(*) segment_count

how can in mysql???

select loger,_date, (schedule_count + segment_count) sum (   select mguser.userid, mguser.username loger,      date_format(trschedule.insdate,'%y-%m-%d') _date,      count(distinct trschedule.scheduleid) schedule_count,        count(*) segment_count     mguser )d 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -