What MySql query should I use? can this be done using INNER JOIN? a sub query?

I have the following mysql table named “schedule”:
fields:
id|name|days

values:
1 | dan | Monday
2 | ken | Monday
3 | josh | Tuesday
4 | karin | Wednesday
5 | dana | Thursday
6 | ruby | Tuesday
7 | linda | Thursday

there is one weekday that only 1 person is schedule to (“Wednesday”).
the rest have more than 1 person for weekday.
what sql query should I use to get that row?

SELECT t.id
     , t.name
     , t.days
  FROM ( SELECT days
           FROM schedule
         GROUP
             BY days
         HAVING COUNT(*) = 1
       ) AS d
INNER
  JOIN schedule AS t
    ON t.days = d.days        

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.