--- whoisquilty <[EMAIL PROTECTED]> wrote:

> I see the problem with my earlier post. My mistake.
> 
> rankid (id for each row)
> vidno (id number of the video viewed i.e. page loaded)
> access_time (date/time it is accessed)
> 
> So, vidno is the id number for the video. I will join another table
> based on vidno that will show the info on the video that is viewed,
> therefore displaying that info in the "most popular".
> 
> Even when I group by vidno, it tells me that it can't group on
> popular, however.

SELECT vidno, COUNT(*) AS popular FROM tablename GROUP BY vidno ORDER BY
popular DESC LIMIT 10;

James

Reply via email to