Dludora/Bird-minidev-sqlserver-oracle huggingface dataset:
Database: california_schools

Question: What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores.
Evidence: Usually, administrators manage the school stuff.
SQL (SQLite): SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'
SQL (SQL Server): SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'
SQL (Oracle): SELECT T2.School, T1.AvgScrWrite FROM satscores T1 INNER JOIN schools T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'

Question: Which state special schools have the highest number of enrollees from grades 1 through 12?
Evidence: State Special Schools refers to DOC = 31; Grades 1 through 12 means K-12
SQL (SQLite): SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1
SQL (SQL Server): SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.[Enrollment (K-12)] DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T2.School FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1."ENROLLMENT (K-12)" DESC NULLS LAST FETCH FIRST 1 ROWS ONLY

Question: What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?
Evidence: Elementary School District refers to DOC = 52; Monthly average number of schools that opened in 1980 = count(schools that opened in 1980) / 12
SQL (SQLite): SELECT CAST(COUNT(School) AS REAL) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND strftime('%Y', OpenDate) = '1980'
SQL (SQL Server): SELECT TRY_CAST(COUNT(School) AS FLOAT) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND YEAR(OpenDate) = '1980'
SQL (Oracle): SELECT CAST(COUNT(School) AS BINARY_DOUBLE) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND SUBSTR(OpenDate, 1, 4) = '1980'

Question: What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?
Evidence: Elementary School District refers to DOC = 52; Unified School District refers to DOC = 54.
SQL (SQLite): SELECT CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'
SQL (SQL Server): SELECT TRY_CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS FLOAT) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) AS _agg1 FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'
SQL (Oracle): SELECT CAST(SUM(CASE WHEN DOC = 54 THEN CAST(1 AS BINARY_DOUBLE) ELSE 0.0 END) AS BINARY_DOUBLE) / SUM(CASE WHEN DOC = 52 THEN CAST(1 AS BINARY_DOUBLE) ELSE 0.0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'
Database: california_schools

Question: What is the postal street address for the school with the 7th highest Math average? Indicate the school's name.
Evidence: Postal street and mailing street are synonyms.
SQL (SQLite): SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 6, 1
SQL (SQL Server): SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC OFFSET 6 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T2.MailStreet, T2.School FROM satscores T1 INNER JOIN schools T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC NULLS LAST OFFSET 6 ROWS FETCH NEXT 1 ROWS ONLY

Question: What is the total number of non-chartered schools in the county of Los Angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?
Evidence: non-chartered schools refer to schools whose Charter = 0; K-12 means grades 1 through 12; percent of eligible free rate for K-12 = `Free Meal Count (K-12)` * 100 / `Enrollment (K-12)`
SQL (SQLite): SELECT COUNT(T2.School) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.Charter = 0 AND CAST(T1.`Free Meal Count (K-12)` AS REAL) * 100 / T1.`Enrollment (K-12)` < 0.18
SQL (SQL Server): SELECT COUNT(T2.School) AS _agg1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND TRY_CAST(T2.Charter AS FLOAT) = 0 AND TRY_CAST(T1.[Free Meal Count (K-12)] AS FLOAT) * 100 / NULLIF(TRY_CAST(T1.[Enrollment (K-12)] AS FLOAT), 0) < 0.18
SQL (Oracle): SELECT COUNT(T2.School) FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND TO_NUMBER(NULLIF(REGEXP_SUBSTR(T2.Charter, '-?[0-9]+(?:\.[0-9]+)?'), '')) = 0 AND TO_NUMBER(NULLIF(REGEXP_SUBSTR(T1."FREE MEAL COUNT (K-12)", '-?[0-9]+(?:\.[0-9]+)?'), '')) * 100 / NULLIF(TO_NUMBER(NULLIF(REGEXP_SUBSTR(T1."ENROLLMENT (K-12)", '-?[0-9]+(?:\.[0-9]+)?'), '')), 0) < 0.18

Question: How many students from the ages of 5 to 17 are enrolled at the State Special School school in Fremont for the 2014-2015 academic year?
Evidence: State Special School means EdOpsCode = 'SSS'
SQL (SQLite): SELECT T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND T1.`Academic Year` BETWEEN 2014 AND 2015
SQL (SQL Server): SELECT T1.[Enrollment (Ages 5-17)] FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND TRY_CAST(LEFT(T1.[Academic Year], 4) AS FLOAT) BETWEEN 2014 AND 2015
SQL (Oracle): SELECT T1."ENROLLMENT (AGES 5-17)" FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND TO_NUMBER(NULLIF(SUBSTR(T1."ACADEMIC YEAR", 1, 4), '')) BETWEEN 2014 AND 2015
Database: california_schools

Question: Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent (%) Eligible FRPM (Ages 5-17)?
Evidence: Percent (%) Eligible FRPM (Ages 5-17) can be acquired by `FRPM Count (Ages 5-17)` / `Enrollment (Ages 5-17)` * 100
SQL (SQLite): SELECT T2.School, T1.`FRPM Count (Ages 5-17)` * 100 / T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'
SQL (SQL Server): SELECT T2.School, T1.[FRPM Count (Ages 5-17)] * 100 / NULLIF(T1.[Enrollment (Ages 5-17)], 0) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'
SQL (Oracle): SELECT T2.School, T1."FRPM COUNT (AGES 5-17)" * 100 / NULLIF(T1."ENROLLMENT (AGES 5-17)", 0) FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'

Question: Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.
Evidence: 'Does not offer physical building' means Virtual = F in the database.
SQL (SQLite): SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC LIMIT 1
SQL (SQL Server): SELECT County, COUNT(Virtual) AS _agg1 FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC NULLS LAST FETCH FIRST 1 ROWS ONLY

Question: What is the grade span offered in the school with the highest longitude?
Evidence: the highest longitude refers to the school with the maximum absolute longitude value.
SQL (SQLite): SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1
SQL (SQL Server): SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC NULLS LAST FETCH FIRST 1 ROWS ONLY
Database: california_schools

Question: Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade, how many offers Multiple Provision Types? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.
Evidence: Kindergarten to 8th grade refers to K-8; 'Offers a magnet program' means Magnet = 1; Multiple Provision Types refers to `NSLP Provision Status` = 'Multiple Provision Types'
SQL (SQLite): SELECT T2.City, COUNT(T2.CDSCode) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.`NSLP Provision Status` = 'Multiple Provision Types' GROUP BY T2.City
SQL (SQL Server): SELECT T2.City, COUNT(T2.CDSCode) AS _agg1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.[NSLP Provision Status] = 'Multiple Provision Types' GROUP BY T2.City
SQL (Oracle): SELECT T2.City, COUNT(T2.CDSCode) FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1."NSLP PROVISION STATUS" = 'Multiple Provision Types' GROUP BY T2.City

Question: What is the Percent (%) Eligible Free (K-12) in the school administered by an administrator whose first name is Alusine. List the district code of the school.
Evidence: Percent (%) Eligible Free (K-12) = `Free Meal Count (K-12)` / `Enrollment (K-12)` * 100%
SQL (SQLite): SELECT T1.`Free Meal Count (K-12)` * 100 / T1.`Enrollment (K-12)`, T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'
SQL (SQL Server): SELECT T1.[Free Meal Count (K-12)] * 100 / NULLIF(T1.[Enrollment (K-12)], 0), T1.[District Code] FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'
SQL (Oracle): SELECT T1."FREE MEAL COUNT (K-12)" * 100 / NULLIF(T1."ENROLLMENT (K-12)", 0), T1."DISTRICT CODE" FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'
Database: california_schools

Question: What are the valid e-mail addresses of the administrator of the school located in the San Bernardino county, City of San Bernardino City Unified that opened between 1/1/2009 to 12/31/2010 whose school types are public Intermediate/Middle Schools and Unified Schools?
Evidence: Intermediate/Middle Schools refers to SOC = 62; Unified School refers to DOC = 54; years between 2009 and 2010 can refer to 'between 1/1/2009 to 12/31/2010'
SQL (SQLite): SELECT T2.AdmEmail1, T2.AdmEmail2 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND strftime('%Y', T2.OpenDate) BETWEEN '2009' AND '2010' AND T2.SOC = 62
SQL (SQL Server): SELECT T2.AdmEmail1, T2.AdmEmail2 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND YEAR(T2.OpenDate) BETWEEN '2009' AND '2010' AND T2.SOC = 62
SQL (Oracle): SELECT T2.AdmEmail1, T2.AdmEmail2 FROM frpm T1 INNER JOIN schools T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND SUBSTR(T2.OpenDate, 1, 4) BETWEEN '2009' AND '2010' AND T2.SOC = 62
Database: financial

Question: How many accounts who choose issuance after transaction are staying in East Bohemia region?
Evidence: A3 contains the data of region; 'POPLATEK PO OBRATU' represents for 'issuance after transaction'.
SQL (SQLite): SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'
SQL (SQL Server): SELECT COUNT(T2.account_id) AS _agg1 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'
SQL (Oracle): SELECT COUNT(T2.account_id) FROM district T1 INNER JOIN account T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'

Question: List out the no. of districts that have female average salary is more than 6000 but less than 10000?
Evidence: A11 refers to average salary; Female mapps to gender = 'F'
SQL (SQLite): SELECT COUNT(DISTINCT T2.district_id)  FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000
SQL (SQL Server): SELECT COUNT(DISTINCT T2.district_id) AS _agg1 FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000
SQL (Oracle): SELECT COUNT(DISTINCT T2.district_id) FROM client T1 INNER JOIN district T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000

Question: How many male customers who are living in North Bohemia have average salary greater than 8000?
Evidence: Male means that gender = 'M'; A3 refers to region; A11 pertains to average salary.
SQL (SQLite): SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'north Bohemia' AND T2.A11 > 8000
SQL (SQL Server): SELECT COUNT(T1.client_id) AS _agg1 FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'north Bohemia' AND T2.A11 > 8000
SQL (Oracle): SELECT COUNT(T1.client_id) FROM client T1 INNER JOIN district T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'north Bohemia' AND T2.A11 > 8000
Database: financial

Question: List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?
Evidence: Female means gender = 'F'; A11 refers to average salary; Gap = highest average salary - lowest average salary; If the person A's birthdate > B's birthdate, it means that person B is order than person A.
SQL (SQLite): SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1
SQL (SQL Server): SELECT T1.account_id, ( SELECT MAX(A11) - MIN(A11) AS _agg1 FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT TOP 1 district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC ) ORDER BY T2.A11 DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T1.account_id, ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account T1 INNER JOIN district T2 ON T1.district_id = T2.district_id INNER JOIN disp T3 ON T1.account_id = T3.account_id INNER JOIN client T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC NULLS FIRST FETCH FIRST 1 ROWS ONLY ) ORDER BY T2.A11 DESC NULLS LAST FETCH FIRST 1 ROWS ONLY

Question: List out the account numbers of clients who are youngest and have highest average salary?
Evidence: If the person A's birthdate < B's birthdate, it means that person B is younger than person A; A11 refers to average salary
SQL (SQLite): SELECT T1.account_id  FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.client_id = T3.client_id INNER JOIN district AS T4 on T4.district_id = T1.district_id WHERE T2.client_id = ( SELECT client_id FROM client ORDER BY birth_date DESC LIMIT 1) GROUP BY T4.A11, T1.account_id
SQL (SQL Server): SELECT T1.account_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.client_id = T3.client_id INNER JOIN district AS T4 on T4.district_id = T1.district_id WHERE T2.client_id = ( SELECT TOP 1 client_id FROM client ORDER BY birth_date DESC) GROUP BY T4.A11, T1.account_id
SQL (Oracle): SELECT T1.account_id FROM account T1 INNER JOIN disp T2 ON T1.account_id = T2.account_id INNER JOIN client T3 ON T2.client_id = T3.client_id INNER JOIN district T4 on T4.district_id = T1.district_id WHERE T2.client_id = ( SELECT client_id FROM client ORDER BY birth_date DESC NULLS LAST FETCH FIRST 1 ROWS ONLY) GROUP BY T4.A11, T1.account_id
Database: financial

Question: Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.
Evidence: 'POPLATEK TYDNE' stands for weekly issuance
SQL (SQLite): SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1
SQL (SQL Server): SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE YEAR(T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T2.account_id FROM loan T1 INNER JOIN account T2 ON T1.account_id = T2.account_id WHERE SUBSTR(T1."DATE", 1, 4) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount NULLS FIRST FETCH FIRST 1 ROWS ONLY

Question: Among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993.
Evidence: Loan validity more than 12 months refers to duration > 12
SQL (SQLite): SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC LIMIT 1
SQL (SQL Server): SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE YEAR(T2.date) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T1.account_id FROM loan T1 INNER JOIN account T2 ON T1.account_id = T2.account_id WHERE SUBSTR(T2."DATE", 1, 4) = '1993' AND T1.duration > 12 ORDER BY T1.amount DESC NULLS LAST FETCH FIRST 1 ROWS ONLY

Question: Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?
Evidence: Customers refer to clients; Female refers to gender = 'F'; Names of districts appear in column A2
SQL (SQLite): SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND STRFTIME('%Y', T2.birth_date) < '1950' AND T1.A2 = 'Sokolov'
SQL (SQL Server): SELECT COUNT(T2.client_id) AS _agg1 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND YEAR(T2.birth_date) < '1950' AND T1.A2 = 'Sokolov'
SQL (Oracle): SELECT COUNT(T2.client_id) FROM district T1 INNER JOIN client T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND SUBSTR(T2.birth_date, 1, 4) < '1950' AND T1.A2 = 'Sokolov'
Database: financial

Question: For the female client who was born in 1976/1/29, which district did she opened her account?
Evidence: Female refers to gender = 'F'; A2 refers to district names
SQL (SQLite): SELECT T1.A2 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'
SQL (SQL Server): SELECT T1.A2 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'
SQL (Oracle): SELECT T1.A2 FROM district T1 INNER JOIN client T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'

Question: For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?
Evidence: Percentage of the male clients = DIVIDE(COUNT(male clients), COUNT(clients)) * 100; Male refers to gender = 'M', A3 is the region name. A4 contains the information about inhabitants.
SQL (SQLite): SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'south Bohemia' GROUP BY T2.A4 ORDER BY T2.A4 DESC LIMIT 1
SQL (SQL Server): SELECT TRY_CAST(SUM(CASE WHEN T1.gender = 'M' THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(T1.client_id) AS _agg1 FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'south Bohemia' GROUP BY T2.A4 ORDER BY T2.A4 DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT CAST(SUM(CASE WHEN T1.gender = 'M' THEN CAST(1 AS BINARY_DOUBLE) ELSE 0.0 END) AS BINARY_DOUBLE) * 100 / COUNT(T1.client_id) FROM client T1 INNER JOIN district T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'south Bohemia' GROUP BY T2.A4 ORDER BY T2.A4 DESC NULLS LAST FETCH FIRST 1 ROWS ONLY