SELECT video.*, video_view.viewnumber, video_view.viewtime from video video INNER JOIN viddomains ON video.VID = viddomains.VID INNER JOIN video_view ON video.VID = video_view.VID where viddomains.domainid=7 and video.type='public' and active = '1' AND video.uploaded_ftp = 1 GROUP BY video.VID order by video.addtime desc