# --------------------------------------------------------------
# sample for xtab.pl
# creates a cross-tabulation (sum of salary)
# having countries as rows and department items as columns
# --------------------------------------------------------------
# usage: perl xtab.pl < dept-salary-sum.xtab [| mysql -t ]
# --------------------------------------------------------------
title=country-dept-salary
database=xcompany
row_name=country
row_alias=country
col_name=dept_code
col_alias=dept
col_value=salary
col_from=FROM departments
col_where=
col_order=ORDER BY dept_sort_order
row_from=FROM countries INNER JOIN locations USING (country_code) INNER JOIN employees USING(loc_code)
row_where=
row_order=ORDER BY country_sort_order
row_group=group by country