SELECT u.openid,u.nickName,o.order_id,o.real_total_fee,i.venue_id,GROUP_CONCAT(i.time SEPARATOR ',') as time,GROUP_CONCAT(i.time_zone SEPARATOR ',') as time_zone,o.payment,o.state,o.created_at FROM ox_appoint_order o inner JOIN ox_user u ON u.id = o.user_id inner join ox_appoint_order_item i on i.appoint_order_id=o.id where o.state=1 GROUP BY o.order_id