As part of my data model, I'd like to know what's "hot". Therefore, I'm
recording views of particular model items (products). In order to use
this information, I'd like to perform a query like the following:

select product_id, count(product_id) as temp from product_views order
by temp group by product_id limit 5

This should retrieve the top 5 most viewed products.

The problem is, I don't know how to specify a query like this in
SQLObject. Ideally, I'd prefer the count to simply appear as a property
of the product and order by the number of views, but I suspect that's
asking too much of SQLObject.

Reply via email to