I have a table that contains articles posted by users. The structure of the table is like this:
id uid author article_name article num_views edit_time
id is the article id, uid is the author id and num_views is how many times this article is being viewed.
What I need is to display ONLY the most viewed article according to uid
In short , if uid is author id and article id is 5 , what I need is to display something like :
id uid article_name num_views
5 1 article title 100
I tried to run several queries in Mysql but i could not figure it out , can anyone help please ??
The most viewed article and its count by each user:
For only given uid