SQL for Subversion update-report

2007-10-03 Thread Jack Bates
I'm working on a Subversion interface to MediaWiki and am struggling with the SQL to respond to Subversion's update-report: http://www.mediawiki.org/wiki/WebDAV MediaWiki's revision table contains unique revision ids and the corresponding page id. The page table contains unique page ids and the co

ordered list of titles, with fallback if title is only available in another language

2008-06-04 Thread Jack Bates
Given columns a, b, and c, where I GROUP BY a, how do I get the value of column b in each group which corresponds to the maximum value of column c? I have a table which contains some translated records. Column a is the record id, column b is a translated field e.g. the title, and column c is a lan