I have a query,
SELECT t2.id, t1.image, SUBSTRING(t2.start_time,1,10) AS mytime, 
  t2.user 
FROM post_table t1 
INNER JOIN watchUserList t2 ON t1.id = t2.movie_id 
WHERE user = 'john@gmail.com' 
ORDER BY id DESC;
In this query I want to fetch DISTINCT of mytime. I tried DISTINCT(SUBSTRING(t2.start_time,1,10)) AS mytime and SUBSTRING(t2.start_time,1,10) AS DISTINCT(mytime). But both doesn't work. How to get Distinct of a Substring in MySQL. Is there any way?
 
     
    