table Article ( id int primary key, ...);
table View ( id int primary key, articleID int references Article(id) on delete cascade, ...);
table Topic ( id int primary key, topic varchar(20) not null, articleID int references Article(id) on delete cascade);
I need to have the most viewed articles and the most viewed article on a given topic. I thought I could have a group by on the articleID on the View table. Can I use "order by count(*)" to finish the query statement?
Can someone point me the right direction to work it out?
Any help will be highly appreciated.
Vernon