Using a self join to select the rows with the maxium values per group
posted: June 1st, 2006 · by: Sven
Phew. This really baffled me. I use SQL for *years* now … but I haven’t been able to come up with a working statement for a query that I’ve thought to be a really trivial thing at first.
Like this:
I have a table articles which can belong to blogs. But blogs are subclasses of an abstract type called location. Thus, each article holds a key to the table locations where there is a column type, which will have the value ‘blog’ for each concrete blog.
Read the rest of this entry