Wrapper 1 - From xQuery to SQL (almost done)