1sf/bird-sql-dev-xresults huggingface dataset:
Database: card_games
Question: Among the cards whose version of frame style is 1997, what is the status of the card illustrated by D. Alexander Gregory in legacy play format that has sensitive content or Wizards of the Coast?
Evidence: version of frame style is 1997 refers to frameVersion = '1997'; illustrated by D. Alexander Gregory refers to artist = 'D. Alexander Gregory'; sensitive content refers to hasContentWarning = 1; legacy play format refers to format = 'legacy'; status of the card refers to status
SQL: SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy'
Database: card_games
Question: Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.
Evidence: ranked 1st on EDHRec refers to edhrecRank = 1; banned refers to status = 'Banned'; play format refers to format; cards name refers to name
SQL: SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format
Database: card_games
Question: What is the annual average number of sets that were released between 1/1/2012 to 12/31/2015? Indicate the common langugage of the card.
Evidence: AVG(id); releaseDate BETWEEN 1/1/2012 AND 12/31/2015; the common language refers to MAX(COUNT(language))
SQL: SELECT (CAST(SUM(T1.id) AS REAL) / COUNT(T1.id)) / 4, T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.id = T2.id WHERE T1.releaseDate BETWEEN '2012-01-01' AND '2015-12-31' GROUP BY T1.releaseDate ORDER BY COUNT(T2.language) DESC LIMIT 1
Database: card_games
Question: List the artists who illustrated cards with black borders which are available only in arena.
Evidence: black borders refers to BorderColor = 'black'; available only in arena refers to availability = 'arena'
SQL: SELECT DISTINCT artist FROM cards WHERE availability = 'arena' AND BorderColor = 'black'
Database: card_games
Question: Find the uuid of cards in which the old school format is restricted or banned.
Evidence: old school format refers to format = 'oldschool'; restricted or banned refers to status = 'banned' or 'restricted'
SQL: SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')
Database: card_games
Question: Among the card designed by Matthew D. Wilson, how many are available only in the paper?
Evidence: card designed by Matthew D. Wilson refers to artist = 'Matthew D. Wilson'; available only in the paper refers to availability = 'paper'
SQL: SELECT COUNT(id) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'
Database: card_games
Question: What are the rulings for the card named and designed by Kev Walker? List them in descending order of dates.
Evidence: rulings refers to text; card named and designed by Kev Walker refers to artist = 'Kev Walker'; descending order of dates refers to MAX(date);
SQL: SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Kev Walker' ORDER BY T2.date DESC
Database: card_games
Question: List the names of all the cards in the set Hour of Devastation and find the formats in which these cards are legal.
Evidence: the set Hour of Devastation refers to set.name = 'Hour of Devastation'; names of all the cards in the set refers to cards.name; legal cards refers to status = 'Legal'; the formats refers to format
SQL: SELECT DISTINCT T2.name , CASE WHEN T1.status = 'Legal' THEN T1.format ELSE NULL END FROM legalities AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid WHERE T2.setCode IN ( SELECT code FROM sets WHERE name = 'Hour of Devastation' )
Database: card_games
Question: Find and list the names of sets which doesn't have Japanese translation but have Korean translation.
Evidence: names of sets refers to name; doesn't have Japanese translation refers to language not like '%Japanese%'; have Korean translation refers to language = 'Korean'
SQL: SELECT name FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Korean' AND language NOT LIKE '%Japanese%' )
Database: card_games
Question: List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any.
Evidence: frame styles refers to frameVersion; cards Allen Williams worked on refers to artist = 'Allen Williams'; banned cards refers to status = 'Banned'
SQL: SELECT DISTINCT T1.frameVersion, T1.name , IIF(T2.status = 'Banned', T1.name, 'NO') FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Allen Williams'
Database: codebase_community
Question: Which user has a higher reputation, Harlan or Jarrod Dixon?
Evidence: "Harlan" and "Jarrod Dixon" are both DisplayName; highest reputation refers to Max(Reputation)
SQL: SELECT DisplayName FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') AND Reputation = ( SELECT MAX(Reputation) FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') )
Database: codebase_community
Question: Please list the display names of all the users whose accounts were created in the year 2011.
Evidence: account created in the year 2011 refers to year(CreationDate) = 2011
SQL: SELECT DisplayName FROM users WHERE STRFTIME('%Y', CreationDate) = '2011'
Database: codebase_community
Question: How many users last accessed the website after 2014/9/1?
Evidence: last accessed after 2014/9/1 refers to LastAccessDate > '2014-09-01'
SQL: SELECT COUNT(Id) FROM users WHERE date(LastAccessDate) > '2014-09-01'
Database: codebase_community
Question: What is the display name of the user who has the most number of views?
Evidence: user who has the most number of view refers to Max(Views)
SQL: SELECT DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )
Database: codebase_community
Question: Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes?
Evidence: more than 100 upvotes refers to Upvotes > 100; more than 1 downvotes refers to Downvotes > 1
SQL: SELECT COUNT(Id) FROM users WHERE Upvotes > 100 AND Downvotes > 1
Database: codebase_community
Question: How many users with more than 10 views created their account after the year 2013?
Evidence: more than 10 views refers to Views > 10; created after the year 2013 refers to year (CreationDate) > 2013
SQL: SELECT COUNT(id) FROM users WHERE STRFTIME('%Y', CreationDate) > '2013' AND Views > 10
Database: codebase_community
Question: How many posts does the user csgillespie own?
Evidence: "csgillespie" is the DisplayName of user
SQL: SELECT COUNT(T1.id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
Database: codebase_community
Question: Please list the titles of the posts owned by the user csgillespie?
Evidence: "csgillespie" is the DisplayName of user
SQL: SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
Database: codebase_community
Question: Who is the owner of the post "Eliciting priors from experts"?
Evidence: "Eliciting priors from experts" is the Title of post; owner refers to DisplayName
SQL: SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
Database: codebase_community
Question: What is the title of the post that is owned by csgillespie and has the highest popularity?
Evidence: "csgillespie" is the DisplayName of user; highest popularity refers to Max(ViewCount)
SQL: SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' ORDER BY T1.ViewCount DESC LIMIT 1
Database: codebase_community
Question: What is the display name of the user who is the owner of the most valuable post?
Evidence: most valuable post refers to Max(FavoriteCount)
SQL: SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id ORDER BY T1.FavoriteCount DESC LIMIT 1
Database: codebase_community
Question: What is the total number of comments of all the posts owned by csgillespie?
Evidence: "csgillespie" is the DisplayName of user; total number of comments refers to Sum(CommentCount)
SQL: SELECT SUM(T1.CommentCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
Database: codebase_community
Question: For the post that got the most number of answers owned by csgillespie, how many answers did it get?
Evidence: "csgillespie" is the DisplayName of user; the most number of answer refers to Max(AnswerCount)
SQL: SELECT MAX(T1.AnswerCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'
Database: codebase_community
Question: What is the display name of the user who last edited the post "Examples for teaching: Correlation does not mean causation"?
Evidence: "Examples for teaching: Correlation does not mean causation" is the Title of post; user who last edited refers to LastEditorUserId
SQL: SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation'
Database: codebase_community
Question: Among the posts owned by csgillespie, how many of them are root posts?
Evidence: "csgillespie" is the DisplayName of user; root post refers to ParentId IS Null
SQL: SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' AND T1.ParentId IS NULL
Database: codebase_community
Question: Please list the display names of all the users who owns a post that is well-finished.
Evidence: the post that is well-finished refers to ClosedDate IS NOT Null
SQL: SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.ClosedDate IS NOT NULL
Database: codebase_community
Question: Among the posts owned by an elder user, how many of them have a score of over 19?
Evidence: elder users refers to Age > 65; Score of over 19 refers to Score > = 20
SQL: SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score >= 20 AND T2.Age > 65
Database: codebase_community
Question: What is the location of the owner of the post "Eliciting priors from experts"?
Evidence: Owner refers to OwnerUserId; 'Eliciting priors from experts' is the Title of post
SQL: SELECT T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'
Database: codebase_community
Question: From which post is the tag "bayesian" excerpted from? Please give the body of the post.
Evidence: "bayesian" is the TagName; excerpt from refers to ExcerptPostId
SQL: SELECT T2.Body FROM tags AS T1 INNER JOIN posts AS T2 ON T2.Id = T1.ExcerptPostId WHERE T1.TagName = 'bayesian'
Database: financial
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: 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'
Database: financial
Question: List out the accounts who have the earliest trading date in 1995 ?
SQL: SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1
Database: financial
Question: State different accounts who have account opening date before 1997 and own an amount of money greater than 3000USD
SQL: SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) < '1997' AND T1.amount > 3000
Database: financial
Question: The transaction of 840 USD happened in 1998/10/14, when was this account opened?
SQL: SELECT T1.date FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.amount = 840 AND T2.date = '1998-10-14'
Database: financial
Question: What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?
SQL: SELECT T4.amount FROM card AS T1 JOIN disp AS T2 ON T1.disp_id = T2.disp_id JOIN account AS T3 on T2.account_id = T3.account_id JOIN trans AS T4 on T3.account_id = T4.account_id WHERE T1.issued = '1996-10-21' ORDER BY T4.amount DESC LIMIT 1
Database: financial
Question: What is the gender of the oldest client who opened his/her account in the highest average salary branch?
Evidence: Earlier birthdate refers to older age; A11 refers to average salary
SQL: SELECT T2.gender FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id ORDER BY T1.A11 DESC, T2.birth_date ASC LIMIT 1
Database: financial
Question: How many clients opened their accounts in Jesenik branch were women?
Evidence: A2 has region names; Woman and female share the same meaning; female refers to gender = 'F'
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A2 = 'Jesenik'
Database: financial
Question: How many accounts were opened in Litomerice in 1996?
Evidence: A2 refers to district name; Litomerice is one of district names.
SQL: SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1996' AND T1.A2 = 'Litomerice'
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: 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'
Database: financial
Question: For the first client who opened his/her account in Prague, what is his/her account ID?
Evidence: A3 stands for region names
SQL: SELECT T1.account_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'Prague' ORDER BY T1.date ASC LIMIT 1
Database: financial
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: 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
Database: financial
Question: For the client whose loan was approved first in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27?
Evidence: Increase rate of his/her account balance = [(balance of date A - balance of date B) / balance of Date B] * 100%
SQL: SELECT CAST((SUM(IIF(T3.date = '1998-12-27', T3.balance, 0)) - SUM(IIF(T3.date = '1993-03-22', T3.balance, 0))) AS REAL) * 100 / SUM(IIF(T3.date = '1993-03-22', T3.balance, 0)) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T3.account_id = T2.account_id WHERE T1.date = '1993-07-05'
Database: financial
Question: What is the percentage of loan amount that has been fully paid with no issue.
Evidence: Loan paid with no issue means contract finished, no problems; status = 'A' means contract finished, no problems; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100%
SQL: SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan
Database: financial
Question: For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue.
Evidence: Status = 'C' stands for running contract, ok so far; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100.
SQL: SELECT CAST(SUM(status = 'C') AS REAL) * 100 / COUNT(account_id) FROM loan WHERE amount < 100000
Database: financial
Question: For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.
Evidence: Records about district names could be found in A2; A3 contains the information about regions. 'POPLATEK PO OBRATU' stands for issuance after transaction
SQL: SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND STRFTIME('%Y', T1.date)= '1993'
Database: financial
Question: From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.
Evidence: Accounts holder refers to the person who own this account.
SQL: SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000'
Database: financial
Question: List account ID and account opening date for accounts from 'Prachatice'.
Evidence: A2 refers to the names of districts.
SQL: SELECT T1.account_id, T1.date FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Prachatice'
Database: financial
Question: State the district and region for loan ID '4990'.
Evidence: A2, A3 contains the information about district and region respectively.
SQL: SELECT T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.loan_id = 4990
Database: financial
Question: Provide the account ID, district and region for loan amount greater than USD300,000.
Evidence: A2 contains district names and A3 contains region names.
SQL: SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.amount > 300000
Database: financial
Question: List the loan ID, district and average salary for loan with duration of 60 months.
Evidence: A3 refers to regions; A11 refers to average salary
SQL: SELECT T3.loan_id, T2.A2, T2.A11 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.duration = 60
Database: financial
Question: For loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996.
Evidence: Unemployment increment rate in percentage = [(unemployment rate 2016 - unemployment rate 2015) / unemployment rate 2015] * 100; unemployment rate 2015 appears in the A12; unemployment rate 2016 appears in the A13; Loan contracts which are still running where client are in debt can be presented as status = 'D'
SQL: SELECT CAST((T3.A13 - T3.A12) AS REAL) * 100 / T3.A12 FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.status = 'D'
Database: financial
Question: Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993.
Evidence: A2 contains the information about district.
SQL: SELECT CAST(SUM(T1.A2 = 'Decin') AS REAL) * 100 / COUNT(account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1993'
Database: financial
Question: List the account IDs with monthly issuance of statements.
Evidence: 'POPLATEK MESICNE' stands for monthly issuance
SQL: SELECT account_id FROM account WHERE Frequency = 'POPLATEK MESICNE'
Database: financial
Question: List the top nine districts, by descending order, from the highest to the lowest, the number of female account holders.
Evidence: A2 refers to districts; Female refers to gender = 'F'
SQL: SELECT T2.A2, COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' GROUP BY T2.district_id, T2.A2 ORDER BY COUNT(T1.client_id) DESC LIMIT 9
Database: financial
Question: Which are the top ten withdrawals (non-credit card) by district names for the month of January 1996?
Evidence: Non-credit card withdraws refers to type = 'VYDAJ'; January 1996 can be found by date LIKE '1996-01%' in the database; A2 means district names
SQL: SELECT DISTINCT T1.A2 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'VYDAJ' AND T3.date LIKE '1996-01%' ORDER BY A2 ASC LIMIT 10
Database: financial
Question: How many of the account holders in South Bohemia still do not own credit cards?
Evidence: A3 contains the region names; South Bohemia is one of region names.
SQL: SELECT COUNT(T3.account_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.client_id = T3.client_id WHERE T1.A3 = 'south Bohemia' AND T3.type != 'OWNER'
Database: financial
Question: Which district has highest active loan?
Evidence: A3 refers to district names; Active loan refers to running contracts; Status = 'C' stands for running contract, OK so far; Status = 'D' stands for running contract, client in debt
SQL: SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1
Database: financial
Question: What is the average loan amount by male borrowers?
Evidence: Male refers to gender = 'M'
SQL: SELECT AVG(T4.amount) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN loan AS T4 ON T3.account_id = T4.account_id WHERE T1.gender = 'M'
Database: financial
Question: In 1996, which districts have the highest unemployment rate? List their branch location and district name.
Evidence: A2 refers to district names; A13 refers to unemploymant rate in 1996
SQL: SELECT district_id, A2 FROM district ORDER BY A13 DESC LIMIT 1
Database: financial
Question: In the branch where the largest number of crimes were committed in 1996, how many accounts were opened?
Evidence: A16 stands for no. of committed crimes 1996
SQL: SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id GROUP BY T1.A16 ORDER BY T1.A16 DESC LIMIT 1
Database: financial
Question: After making a credit card withdrawal, how many account/s with monthly issuance has a negative balance?
Evidence: Negative balance means balance < 0; Operation = 'VYBER KARTOU' stands for credit card withdraw. Frequency = 'POPLATEK MESICNE' stands for monthly issurance
SQL: SELECT COUNT(T1.account_id) FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T1.balance < 0 AND T1.operation = 'VYBER KARTOU' AND T2.frequency = 'POPLATEK MESICNE'
Database: financial
Question: Between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved?
Evidence: Frequency = 'POPLATEK MESICNE' stands for monthly issurance
SQL: SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date BETWEEN '1995-01-01' AND '1997-12-31' AND T1.frequency = 'POPLATEK MESICNE' AND T2.amount >= 250000
Database: financial
Question: How many accounts have running contracts in Branch location 1?
Evidence: Status = 'C' stands for running contract, OK so far; Status = 'D' stands for running contract, client in debt
SQL: SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T1.district_id = 1 AND (T3.status = 'C' OR T3.status = 'D')