db_schema
stringclasses
1 value
prompt
stringlengths
140
227
response
stringlengths
481
565
text
stringlengths
676
846
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Real Estate and Rental and Leasing industry in Mora County for December 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Real Estate and Rental and Leasing industry in Mora County for December 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Administrative and Support and Waste Management and Remediation Services industry in San Miguel Co for June 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Administrative and Support and Waste Management and Remediation Services industry in San Miguel Co for June 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Administrative and Support and Waste Management and Remediation Services industry in Eddy County for August 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Administrative and Support and Waste Management and Remediation Services industry in Eddy County for August 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Administrative and Support and Waste Management and Remediation Services industry in Otero County for February 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Administrative and Support and Waste Management and Remediation Services industry in Otero County for February 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Manufacturing industry in Catron County for October 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Catron County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Manufacturing industry in Catron County for October 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Catron County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Information industry in Luna County for July 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Information industry in Luna County for July 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Wholesale trade industry in Valencia County for August 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Wholesale trade industry in Valencia County for August 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Construction industry in Socorro County for June 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Construction industry in Socorro County for June 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Health Care and Social Assistance industry in McKinley County for August 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Health Care and Social Assistance industry in McKinley County for August 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Educational Services industry in Sandoval County for November 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Educational Services industry in Sandoval County for November 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Management of Companies and Enterprises industry in Roosevelt County for February 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Roosevelt County%" ) AND `name` LIKE "%Management of Companies and Enterprises%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Management of Companies and Enterprises industry in Roosevelt County for February 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Roosevelt County%" ) AND `name` LIKE "%Management of Companies and Enterprises%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Agriculture, Forestry, Fishing and Hunting industry in San Juan County for June 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Agriculture, Forestry, Fishing and Hunting industry in San Juan County for June 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Utilities industry in San Juan County for May 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Utilities industry in San Juan County for May 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Finance and Insurance industry in Eddy County for November 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Finance and Insurance industry in Eddy County for November 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Wholesale trade industry in San Miguel Co for August 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Wholesale trade industry in San Miguel Co for August 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in Torrance County for October 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Torrance County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in Torrance County for October 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Torrance County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Information industry in San Miguel Co for November 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Information industry in San Miguel Co for November 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Health Care and Social Assistance industry in Guadalupe County for June 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Guadalupe County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Health Care and Social Assistance industry in Guadalupe County for June 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Guadalupe County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Professional, Scientific, and Technical Services industry in Curry County for December 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Professional, Scientific, and Technical Services industry in Curry County for December 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Educational Services industry in Taos County for January 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Educational Services industry in Taos County for January 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Colfax County for December 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Colfax County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Colfax County for December 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Colfax County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Professional, Scientific, and Technical Services industry in Dona Ana County for May 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Professional, Scientific, and Technical Services industry in Dona Ana County for May 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Administrative and Support and Waste Management and Remediation Services industry in Otero County for February 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Administrative and Support and Waste Management and Remediation Services industry in Otero County for February 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Arts, Entertainment, and Recreation industry in Harding County for March 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Arts, Entertainment, and Recreation industry in Harding County for March 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Curry County for January 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Curry County for January 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Manufacturing industry in Taos County for March 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Manufacturing industry in Taos County for March 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Information industry in Chaves County for January 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Information industry in Chaves County for January 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Other Services (except Public Administration) industry in Harding County for October 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Other Services (except Public Administration) industry in Harding County for October 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Manufacturing industry in Bernalillo County for February 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Manufacturing industry in Bernalillo County for February 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Manufacturing industry in Sandoval County for March 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Manufacturing industry in Sandoval County for March 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Transportation and Warehousing industry in San Miguel Co for December 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Transportation and Warehousing industry in San Miguel Co for December 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Manufacturing industry in Bernalillo County for November 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Manufacturing industry in Bernalillo County for November 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Public Administration industry in Valencia County for March 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Public Administration industry in Valencia County for March 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Management of Companies and Enterprises industry in Otero County for February 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Management of Companies and Enterprises%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Management of Companies and Enterprises industry in Otero County for February 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Management of Companies and Enterprises%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Other Services (except Public Administration) industry in Taos County for August 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Other Services (except Public Administration) industry in Taos County for August 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Information industry in Chaves County for July 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Information industry in Chaves County for July 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Unclassified Establishments industry in Luna County for January 2023?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Unclassified Establishments industry in Luna County for January 2023? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Professional, Scientific, and Technical Services industry in Sierra County for October 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sierra County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Professional, Scientific, and Technical Services industry in Sierra County for October 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sierra County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Manufacturing industry in Socorro County for July 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Manufacturing industry in Socorro County for July 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Other Services (except Public Administration) industry in McKinley County for December 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Other Services (except Public Administration) industry in McKinley County for December 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Real Estate and Rental and Leasing industry in Cibola County for October 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Real Estate and Rental and Leasing industry in Cibola County for October 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Public Administration industry in Mora County for July 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Public Administration industry in Mora County for July 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Administrative and Support and Waste Management and Remediation Services industry in Taos County for August 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Administrative and Support and Waste Management and Remediation Services industry in Taos County for August 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Administrative and Support and Waste Management and Remediation Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Public Administration industry in Dona Ana County for October 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Public Administration industry in Dona Ana County for October 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Retail Trade industry in Valencia County for November 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Retail Trade%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Retail Trade industry in Valencia County for November 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Retail Trade%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Other Services (except Public Administration) industry in Bernalillo County for January 2023?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Other Services (except Public Administration) industry in Bernalillo County for January 2023? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Construction industry in San Miguel Co for November 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Construction industry in San Miguel Co for November 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Miguel Co%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Real Estate and Rental and Leasing industry in Otero County for February 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Real Estate and Rental and Leasing industry in Otero County for February 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Utilities industry in Sandoval County for December 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Utilities industry in Sandoval County for December 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Agriculture, Forestry, Fishing and Hunting industry in Torrance County for November 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Torrance County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Agriculture, Forestry, Fishing and Hunting industry in Torrance County for November 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Torrance County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for All Industries industry in Lincoln County for March 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for All Industries industry in Lincoln County for March 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Arts, Entertainment, and Recreation industry in Socorro County for March 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Arts, Entertainment, and Recreation industry in Socorro County for March 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Health Care and Social Assistance industry in Luna County for December 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Health Care and Social Assistance industry in Luna County for December 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Agriculture, Forestry, Fishing and Hunting industry in De Baca County for February 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Agriculture, Forestry, Fishing and Hunting industry in De Baca County for February 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Professional, Scientific, and Technical Services industry in Bernalillo County for June 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Professional, Scientific, and Technical Services industry in Bernalillo County for June 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Agriculture, Forestry, Fishing and Hunting industry in Union County for July 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Union County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Agriculture, Forestry, Fishing and Hunting industry in Union County for July 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Union County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Finance and Insurance industry in De Baca County for September 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-09-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Finance and Insurance industry in De Baca County for September 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-09-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Educational Services industry in Luna County for December 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Educational Services industry in Luna County for December 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Construction industry in Grant County for December 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Grant County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Construction industry in Grant County for December 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Grant County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Educational Services industry in Roosevelt County for December 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Roosevelt County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Educational Services industry in Roosevelt County for December 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Roosevelt County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Luna County for May 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Luna County for May 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Luna County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in San Juan County for February 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in San Juan County for February 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Transportation and Warehousing industry in Hidalgo County for October 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Hidalgo County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Transportation and Warehousing industry in Hidalgo County for October 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-10-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Hidalgo County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Retail Trade industry in Quay County for January 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Quay County%" ) AND `name` LIKE "%Retail Trade%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Retail Trade industry in Quay County for January 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Quay County%" ) AND `name` LIKE "%Retail Trade%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Other Services (except Public Administration) industry in Harding County for January 2023?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Other Services (except Public Administration) industry in Harding County for January 2023? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Professional, Scientific, and Technical Services industry in Colfax County for January 2023?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Colfax County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Professional, Scientific, and Technical Services industry in Colfax County for January 2023? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Colfax County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Real Estate and Rental and Leasing industry in Bernalillo County for August 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Real Estate and Rental and Leasing industry in Bernalillo County for August 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-08-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Arts, Entertainment, and Recreation industry in Otero County for May 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Arts, Entertainment, and Recreation industry in Otero County for May 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Eddy County for November 2022?
SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Returns for Health Care and Social Assistance industry in Eddy County for November 2022? ###Assistant: Here is the genrated query: SELECT `returns` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for All Industries industry in San Juan County for January 2023?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for All Industries industry in San Juan County for January 2023? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Finance and Insurance industry in Curry County for May 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Finance and Insurance industry in Curry County for May 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Curry County%" ) AND `name` LIKE "%Finance and Insurance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Arts, Entertainment, and Recreation industry in De Baca County for December 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Arts, Entertainment, and Recreation industry in De Baca County for December 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%De Baca County%" ) AND `name` LIKE "%Arts, Entertainment, and Recreation%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Accommodation and Food Services industry in Dona Ana County for March 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Accommodation and Food Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Accommodation and Food Services industry in Dona Ana County for March 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-03-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Accommodation and Food Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Educational Services industry in Santa Fe County for July 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Educational Services industry in Santa Fe County for July 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%Educational Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Construction industry in Taos County for July 2022?
SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Receipts for Construction industry in Taos County for July 2022? ###Assistant: Here is the genrated query: SELECT `total_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-07-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Taos County%" ) AND `name` LIKE "%Construction%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for All Industries industry in Union County for December 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Union County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for All Industries industry in Union County for December 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Union County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Information industry in Lincoln County for November 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Information industry in Lincoln County for November 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Information%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Santa Fe County for May 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Santa Fe County for May 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for All Industries industry in Harding County for January 2023?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for All Industries industry in Harding County for January 2023? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Harding County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Unclassified Establishments industry in Mora County for January 2023?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Unclassified Establishments industry in Mora County for January 2023? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Public Administration industry in Otero County for January 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Public Administration industry in Otero County for January 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Otero County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Wholesale trade industry in Eddy County for May 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Wholesale trade industry in Eddy County for May 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Eddy County%" ) AND `name` LIKE "%Wholesale trade%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Manufacturing industry in Mora County for December 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Manufacturing industry in Mora County for December 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Mora County%" ) AND `name` LIKE "%Manufacturing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Professional, Scientific, and Technical Services industry in San Juan County for June 2022?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Professional, Scientific, and Technical Services industry in San Juan County for June 2022? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Transportation and Warehousing industry in Valencia County for January 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Transportation and Warehousing industry in Valencia County for January 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Valencia County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Transportation and Warehousing industry in Socorro County for June 2022?
SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Due for Transportation and Warehousing industry in Socorro County for June 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Socorro County%" ) AND `name` LIKE "%Transportation and Warehousing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Public Administration industry in Cibola County for May 2022?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for Public Administration industry in Cibola County for May 2022? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-05-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Real Estate and Rental and Leasing industry in Lincoln County for December 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Real Estate and Rental and Leasing industry in Lincoln County for December 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-12-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Real Estate and Rental and Leasing%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Professional, Scientific, and Technical Services industry in McKinley County for November 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Professional, Scientific, and Technical Services industry in McKinley County for November 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Professional, Scientific, and Technical Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Public Administration industry in Grant County for January 2023?
SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Grant County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Paid for Public Administration industry in Grant County for January 2023? ###Assistant: Here is the genrated query: SELECT `recipient_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Grant County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Public Administration industry in Chaves County for January 2023?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Public Administration industry in Chaves County for January 2023? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Chaves County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for All Industries industry in San Juan County for January 2023?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for All Industries industry in San Juan County for January 2023? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%San Juan County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Utilities industry in McKinley County for June 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Utilities industry in McKinley County for June 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%McKinley County%" ) AND `name` LIKE "%Utilities%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Lincoln County for April 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-04-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Health Care and Social Assistance industry in Lincoln County for April 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-04-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Lincoln County%" ) AND `name` LIKE "%Health Care and Social Assistance%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in Hidalgo County for January 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Hidalgo County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Unclassified Establishments industry in Hidalgo County for January 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Hidalgo County%" ) AND `name` LIKE "%Unclassified Establishments%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Accommodation and Food Services industry in Sandoval County for February 2022?
SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Accommodation and Food Services%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Adjustment for Accommodation and Food Services industry in Sandoval County for February 2022? ###Assistant: Here is the genrated query: SELECT `adjustment` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-02-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Sandoval County%" ) AND `name` LIKE "%Accommodation and Food Services%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Other Services (except Public Administration) industry in Dona Ana County for June 2022?
SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Total Tax Paid for Other Services (except Public Administration) industry in Dona Ana County for June 2022? ###Assistant: Here is the genrated query: SELECT `total_tax_paid` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-06-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Dona Ana County%" ) AND `name` LIKE "%Other Services (except Public Administration)%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for All Industries industry in Santa Fe County for January 2023?
SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Taxable Receipts for All Industries industry in Santa Fe County for January 2023? ###Assistant: Here is the genrated query: SELECT `taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2023-01-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Santa Fe County%" ) AND `name` LIKE "%All Industries%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Public Administration industry in Bernalillo County for November 2022?
SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Recipient Due for Public Administration industry in Bernalillo County for November 2022? ###Assistant: Here is the genrated query: SELECT `recipient_due` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Bernalillo County%" ) AND `name` LIKE "%Public Administration%" ) AND `name` = "Total";
create table report ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, excel_file_name varchar(128) NOT NULL, excel_tab_name varchar(128) NOT NULL, revenue_group varchar(128), business_activity_month DATE, reporting_month DATE, distribution_month DATE, report_run DATETIME, start DATE, end DATE ); create table industry_entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, entity_id INT NOT NULL, foreign key (entity_id) references entity (id), UNIQUE(name, entity_id) ); create table entity ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(128) NOT NULL, code varchar(32) NOT NULL, UNIQUE(name) ); create table industry_entity_tax ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, report_id INT NOT NULL, industry_entity_id INT NOT NULL, name varchar(128) NOT NULL, returns DOUBLE, total_receipts DOUBLE, taxable_receipts DOUBLE, matched_taxable_receipts DOUBLE, total_tax_due DOUBLE, total_tax_paid DOUBLE, recipient_paid DOUBLE, recipient_due DOUBLE, adjustment DOUBLE, foreign key (report_id) references report (id), foreign key (industry_entity_id) references industry_entity (id) );
Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Agriculture, Forestry, Fishing and Hunting industry in Cibola County for November 2022?
SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";
###Human: Using the db_schema, generate a sql query for the following prompt: What is the Matched Taxable Receipts for Agriculture, Forestry, Fishing and Hunting industry in Cibola County for November 2022? ###Assistant: Here is the genrated query: SELECT `matched_taxable_receipts` FROM industry_entity_tax WHERE report_id IN ( SELECT id FROM report WHERE reporting_month = '2022-11-01' ) AND industry_entity_id IN ( SELECT id FROM industry_entity WHERE entity_id IN ( SELECT id FROM entity WHERE name LIKE "%Cibola County%" ) AND `name` LIKE "%Agriculture, Forestry, Fishing and Hunting%" ) AND `name` = "Total";