sql: select m_s_amu_area.*, count(*) as cnt FROM m_mall INNER JOIN m_staff ON m_mall_id = m_staff_mall_id AND m_mall_pref_id = 15 AND m_staff_pc_disp = 1 AND m_mall_view_flg = 1 AND m_mall_confirm_flg = 1 INNER JOIN m_mall_info ON m_minfo_mall_id = m_mall_id AND m_minfo_staffblock_disp = 1 INNER JOIN t_site_view ON t_sv_mall_id = m_mall_id AND t_sv_site_id = 1 AND t_sv_view_flg = 1 AND CASE WHEN t_sv_site_id = 4 AND m_mall_business_id IN(12, 13) THEN m_mall_deli_flg = 1 AND m_minfo_deli_flg = 1 ELSE 1 END INNER JOIN m_pref ON m_pref_id = m_mall_pref_id INNER JOIN m_amu_area ON m_amu_area_id = m_mall_amu_area_id INNER JOIN m_s_amu_area ON m_s_amu_area_id = m_amu_area_s_amu_area_id and m_mall_pref_id=m_s_amu_area_pref_id AND m_s_amu_area_pref_id = 15 INNER JOIN m_business ON m_mall_business_id = m_business_id INNER JOIN m_s_business ON m_s_business_id = m_business_s_business_id AND t_sv_view_flg = 1 LEFT JOIN m_liking_category ON m_liking_cate_id = m_mall_liking_cate_id WHERE 1 = 1 AND ( m_mall_option_kb = 1 OR ( m_mall_option_kb = 0 AND m_staff_sort <= 3 AND m_staff_sort >= 1 AND m_staff_sort IS NOT NULL ) ) AND m_mall_view_flg = 1 AND m_minfo_view_flg = 1 AND m_mall_confirm_flg = 1 AND m_mall_app_flg = 1 AND CASE WHEN m_mall_option_kb THEN 'S' WHEN( m_mall_app_temp_flg = 1 AND ( to_days(now()) - to_days(m_mall_app_temp_date) <= 90 OR to_days(now()) < to_days(m_mall_app_temp_date) ) ) THEN 'A' ELSE 'B' END <> 'B' and COALESCE(m_staff_age, 18) >= 18 AND COALESCE(m_staff_age, 18) <= 200 group by m_s_amu_area_id having cnt > 0 order by m_s_amu_area_sort
Can't create/write to file '/tmp/#sql-temptable-5bae-1de914-17d4b.MAI' (Errcode: 28 "No space left on device")