creates a server-side cross tabulation from a database
