sql - multiple query same table but in different columns mysql -
i'm trying more columns summarizing result 2 different tables set @start_res = 20150301; set @finish_res= 20150501; set @finish_check= 20150801; set @start_check= 20150301; set @daily_hos= 3; select* ( select count(day_in) arr t_hospital day_in between @start_check , @finish_check , res_date between @start_res , @finish_res , id_daily_hos =@daily_hos group day_in )e, (select count(pat_status) ong1 t_hospital pat_status '%ong%' , day_in between @start_check , @finish_check , res_date between @start_res , @finish_res , id_daily_hos =@daily_hos group day_in ) a, (select count(pat_status) rted t_hospital pat_status '%rtde%'and day_in between @start_check , @finish_check , res_date between @start_res , @finish_res , id_daily_hos =@daily_hos group day_in )b, (select count(pat_status) poli t_hospital pat_status '%pol%'and day_in between @start_check , @finish_check , res_date between @start_res , @finish_res , id_daily...