pivot-to-sql automatically converts Excel pivot table reports into optimized SQL queries for direct database execution. See the source code for full details and usage instructions.