unread_count FROM `orders` LEFT JOIN notifications ON notifications.order_id = orders.id AND notifications.user_id = ? AND notifications.state = 0 WHERE `orders`.`deleted_at` IS NULL GROUP BY orders.id
unread_count FROM `orders` LEFT JOIN notifications ON notifications.order_id = orders.id AND notifications.user_id = ? AND notifications.state = 0 WHERE `orders`.`deleted_at` IS NULL GROUP BY orders.id
ELSE t.notifications_yet_count END AS unread_count FROM `orders` LEFT JOIN teams AS t ON t.order_id = orders.id AND t.deleted_at IS NULL AND t.user_id = ? WHERE `orders`.`deleted_at` IS NULL ͍ͬͨΜͷΰʔϧ ˠ+0*/͢ΔςʔϒϧͷϨίʔυྔ͕ݮ͞Εͨ