JL called asking for a list of the Canadian cities from which teachers have registered. I pulled the XML version of the tg_users table from the server and ran this:
let $tables := for $t in //table[column[@name='mailingCountry'][normalize-space(upper-case(.)) = 'CANADA']] return $t let $addresses := for $t in $tables return normalize-space(upper-case(concat($t/column[@name='mailingCity'], ', ', $t/column[@name='mailingState']))) let $uniqueAddresses := distinct-values($addresses) let $orderedAddresses := for $u in $uniqueAddresses order by $u return $u return string-join($orderedAddresses, ' ')
to get a quick-and-dirty list of city, province. I had to search-and-replace some ugly character encoding issues -- the db thinks it has UTF-8 but the data coming in has obviously been 8859-1. Sent the results to JL.