Hi, It looks as though I have been led astray by MySQL. The additional parentheses around the individual SELECTs with the UNION set operation are not supported by SQLite. It appears as though support for ORDER and LIMIT on each SELECT is also a MySQL thing. Sorry for the pointless posts ;-) I'll just create three separate queries... Thanks, Mike