Chinastark/bird_dataset huggingface dataset:
Database: codebase_comments
Note: solution No. refers to solution.id; percentage = DIVidE(MULTIPLY(SUBTRACT(SUM(solution.id = 53546), SUM(solution.id = 1502)), 100)), SUM(solution.id = 1502);
Question: How many percent more of the Forks for the repository of solution No.53546 than No.1502?
SQL: SELECT cast(sum(CASE WHEN solution.id = 53546 THEN repo.forks ELSE 0 END) - sum(CASE WHEN solution.id = 1502 THEN repo.forks ELSE 0 END) AS REAL) * 100 / sum(CASE WHEN solution.id = 1502 THEN repo.forks ELSE 0 END) FROM repo INNER JOIN solution ON repo.id = solution.repoid
Database: codebase_comments
Note: methods refers to name; solution refers to solutionid;
Question: List all the methods with a solution with a "636449700980488000" processed time.
SQL: SELECT DISTINCT METHOD.name FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.processedtime = 636449700980488000
Database: codebase_comments
Note: solutions refers to solution.id; https://github.com/derickbailey/presentations-and-training.git refers to url; url; = 'https://github.com/derickbailey/presentations-and-training.git';
Question: How many solutions are in "https://github.com/derickbailey/presentations-and-training.git"?
SQL: SELECT count(solution.repoid) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.url = 'https://github.com/derickbailey/presentations-and-training.git'
Database: codebase_comments
Note: total processed time = AVG(processedtime where MAX(COUNT(forks))); repository with the most forks refers to MAX(COUNT(forks));
Question: What is the total processed time of all solutions from the repository with the most forks?
SQL: SELECT sum(solution.processedtime) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.forks = ( SELECT max(forks) FROM repo )
Database: codebase_comments
Note: path of the solution refers to path; solution refers to solution.id;
Question: List all the path of solution from all the "it" lang code method.
SQL: SELECT DISTINCT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.lang = 'it'
Database: codebase_comments
Note: path of the solution refers to path; solution refers to solution.id; method refers to name; name = 'spinachLexer.mT__55';
Question: What is the path of solution of "spinachLexer.mT__55" method?
SQL: SELECT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.name = 'spinachLexer.mT__55'
Database: codebase_comments
Note: en methods refers to lang = 'en'; solution refers to solution.id; repository refers to repoid; repoid = 1093;
Question: What are the "en" methods with solutions from repository "1093"
SQL: SELECT DISTINCT METHOD.id FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.repoid = 1093 AND METHOD.lang = 'en'
Database: codebase_comments
Note: path of solutions refers to path; https://github.com/ecoffey/Bebop.git refers to url; url = 'https://github.com/ecoffey/Bebop.git';
Question: What are the paths of solutions in repository "https://github.com/ecoffey/Bebop.git"
SQL: SELECT DISTINCT solution.path FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.url = 'https://github.com/ecoffey/Bebop.git'
Database: codebase_comments
Note: ids of repositories refers to repoid; ro refers to lang = 'ro';
Question: List all the ids of repositories for solutions with "ro" methods.
SQL: SELECT DISTINCT solution.repoid FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.lang = 'ro'
Database: codebase_comments
Note: repository id refers to repoid; tokenized name refers to nametokenized; nametokenized = 'crc parameters get hash code';
Question: What is the repository id of the method with tokenized name "crc parameters get hash code"?
SQL: SELECT solution.repoid FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.nametokenized = 'crc parameters get hash code'
Database: codebase_comments
Note: solution refers to solutionid;
Question: How many methods with solutions with path 'maravillas_linq-to-delicious\tasty.sln'?
SQL: SELECT count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.path = 'maravillas_linq-to-delicious\tasty.sln'
Database: codebase_comments
Note: solution ids refers to solution.id;
Question: List all the solutions ids of the repository with "636430969128176000" processed time
SQL: SELECT solution.id FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.processedtime = 636430969128176000
Database: codebase_comments
Note: url for repository refers to url; longest processed toe trefers to MAX(processedtime);
Question: What is the url for repository that has the longest processed time solution?
SQL: SELECT repo.url FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.processedtime = ( SELECT max(processedtime) FROM solution )
Database: codebase_comments
Note: solutions refers to solution.id; forks higher than half of the watchers refers tto forks>(watchers/2);;
Question: List all the solutions of repositories with the Forks higher than half of the watchers.
SQL: SELECT DISTINCT solution.id FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.forks > repo.watchers / 2
Database: codebase_comments
Note: solution refers to solution.id; solution.id = 104086; percentage = MULTIPLY(DIVidE(Forkk, stars), 100);
Question: What is the percentage of Forks to Stars of repository for solution "104086"?
SQL: SELECT cast(repo.forks AS REAL) * 100 / repo.stars FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.id = 104086
Database: codebase_comments
Note: repository that the most people like refers to MAX(stars);
Question: Please provide the id of the respository that the most people like.
SQL: SELECT id FROM repo WHERE stars = ( SELECT max(stars) FROM repo )
Database: codebase_comments
Note: solution's path refers to path; method refers to name; name = 'HtmlSharp.HtmlParser.Feed';
Question: What is the solution's path of method "HtmlSharp.HtmlParser.Feed"?
SQL: SELECT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.name = 'HtmlSharp.HtmlParser.Feed'
Database: codebase_comments
Note: solution refers to solution.id; solution.id = 35;
Question: Please provide the number of forks that the repository of the solution 35 have.
SQL: SELECT repo.forks FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.id = 35
Database: codebase_comments
Note: id of the solution refers to solution.id; repository has the most watchers refers to MAX(watchers);
Question: Please provide the id of the solution whose repository has the most watchers.
SQL: SELECT solution.id FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.watchers = ( SELECT max(watchers) FROM repo )
Database: codebase_comments
Note: solution refers to solution.id; solution.id = 20;
Question: Please provide the number of stars that the repository of the solution 20 have.
SQL: SELECT repo.stars FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.id = 20
Database: codebase_comments
Note: method refers to name; solution refers to solution.id; solution.id = 1; solution needs to be compiled refers to wascompiled = 0;
Question: How many methods does solution 1 have? And please tell me if solution 1 needs to be compiled.
SQL: SELECT count(METHOD.solutionid) , CASE WHEN solution.wascompiled = 0 THEN 'Needs' ELSE 'NoNeeds' END needtocompile FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.solutionid = 1
Database: codebase_comments
Note: comment is XML format refers to commentisxml = 1; solution needs to be compiled refesr to wascompiled = 0; percentage = MULTIPLY(DIVidE(SUM(wascompiled = 0), COUNT(solution.id)), 100);
Question: What is the percentage of the methods' solutions that need to be compiled among the methods whose comments is XML format?
SQL: SELECT cast(sum(CASE WHEN solution.wascompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.commentisxml = 1
Database: codebase_comments
Note: name of the methods refers to name; solution path refers to path; path = 'wallerdev_htmlsharp\HtmlSharp.sln';
Question: Please list the names of methods with the solution path "wallerdev_htmlsharp\HtmlSharp.sln".
SQL: SELECT METHOD.name FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.path = 'wallerdev_htmlsharpHtmlSharp.sln'
Database: codebase_comments
Note: stars>2000; percentage = DIVidE(MULTIPLY(COUNT(stars>2000), 100), COUNT(id));
Question: What is the percentage of respositories that receive more than 2,000 stars?
SQL: SELECT cast(sum(CASE WHEN stars > 2000 THEN 1 ELSE 0 END) AS REAL) * 100 / count(stars) FROM repo
Database: codebase_comments
Note: solution refers to solution.id; solution.id = 1;
Question: What is the url of solution 1?
SQL: SELECT repo.url FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.id = 1
Database: codebase_comments
Note: repository that received the most forks refers to MAX(forks);
Question: Please provide the id of the respository that received the most forks among the respositories that receive 21 stars.
SQL: SELECT id FROM repo WHERE stars = 21 AND forks = ( SELECT max(forks) FROM repo WHERE stars = 21 )
Database: codebase_comments
Note: english methods refers to lang = 'en'; comment is XML format refers to commentisxml = 1;
Question: What the percentage of the english methods among the methods whose comments is XML format?
SQL: SELECT cast(sum(CASE WHEN lang = 'en' THEN 1 ELSE 0 END) AS REAL) * 100 / count(name) FROM METHOD WHERE commentisxml = 1
Database: codebase_comments
Note: path of solution refers to path; method refers to name; tokenized name refers to nametokenized; name = ''html parser feed';
Question: Please provide the path of solution of method whose tokenized name is html parser feed.
SQL: SELECT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.nametokenized = 'html parser feed'
Database: codebase_comments
Note: solution id of the repository refers to solution.id;
Question: Please provide the solution id of the respository among the respository that receive 238 forks.
SQL: SELECT solution.id FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.forks = 238
Database: codebase_comments
Note: english methods refers to lang = 'en'; tokenized name refers to nametokenized; methods refers to name; solution needs to be compiled refers to wascompiled = 0;
Question: Among the english methods,please list the tokenized names of methods whose solutions need to be compiled.
SQL: SELECT nametokenized FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE lang = 'en' AND wascompiled = 0
Database: codebase_comments
Note: solutions refers to solution.id; repository stars are a third more than forks = (MULTIPLY(stars, 1/3))>forks;
Question: How many solutions whose repository's stars are a third more than forks?
SQL: SELECT count(solution.repoid) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.forks < repo.stars * 1 / 3
Database: codebase_comments
Note: path of solution refers to path; method refers to name; full comment = 'Feeds data into the parser';
Question: Please provide the path of solution of method whose full comment is Feeds data into the parser.
SQL: SELECT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.fullcomment = 'Feeds data into the parser'
Database: codebase_comments
Note: repository refers to repoid; repoid = 3; method refers to name; method whose comment is XML format refers to commentisxml = 1;
Question: Among the repository "3", how many methods whose comments is XML format?
SQL: SELECT count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.repoid = 3 AND METHOD.commentisxml = 1
Database: codebase_comments
Note: method that needs to be compiled refers to wascompiled = 0; English method refers to lang = 'en'; percentage of solutions = MULTIPLY(DIVidE(SUM(wascompiled = 0), COUNT(solution.id)), 100);
Question: What is the percentage of solutions for the method that needs to be compiled in the English methods?
SQL: SELECT cast(sum(CASE WHEN solution.wascompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / count(lang) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.lang = 'en'
Database: codebase_comments
Note: solution refers to solution.id; solution.id = 1 OR 2; percentage = DIVidE(MULTIPLY(SUBTRACT(SUM(solution.id = 1), SUM(solution.id = 2)), 100)), SUM(solution.id = 2);
Question: How many more stars in percentage are there for the repository of solution "1" than solution "2"?
SQL: SELECT cast(sum(CASE WHEN solution.id = 1 THEN repo.stars ELSE 0 END) - sum(CASE WHEN solution.id = 2 THEN repo.stars ELSE 0 END) AS REAL) * 100 / sum(CASE WHEN solution.id = 2 THEN repo.stars ELSE 0 END) FROM repo INNER JOIN solution ON repo.id = solution.repoid
Database: codebase_comments
Note: number of solutions are there whose repositories received the number of stars more than one third of the number of forks refers to stars>DIVidE(forks, 3);
Question: How many solutions are there whose respositories received the number of stars more than one third of the number of forks?
SQL: SELECT count(DISTINCT repo.id) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.stars > cast(repo.forks AS REAL) / 3
Database: codebase_comments
Note: task of the method refers to the second part of the name after the "."; method number refers to method_100k.id; method_100k.id = 2;
Question: What is the task of method number 2?
SQL: SELECT substr(substr(name, instr(name, '.') + 1), 1, instr(substr(name, instr(name, '.') + 1), '.') - 1) task FROM METHOD WHERE id = 2
Database: codebase_comments
Note: format refers commentisxml; method number refers to method_100k.id; method_100k.id = 8;
Question: What format does the method number 8's comment have?
SQL: SELECT CASE WHEN commentisxml = 0 THEN 'isNotXMLFormat' WHEN commentisxml = 1 THEN 'isXMLFormat' END format FROM METHOD WHERE id = 8
Database: codebase_comments
Note: link refers to url; well-known repository refers to MAX(watchers);
Question: Please provide a link to the most well-known repository's Github address.
SQL: SELECT url FROM repo WHERE watchers = ( SELECT max(watchers) FROM repo )
Database: codebase_comments
Note: method refers to name; task of the method refers to the second part of the name after the "."; Czech language refers to lang = 'cs';
Question: What is the task of the method that is in the Czech language?
SQL: SELECT DISTINCT substr(substr(name, instr(name, '.') + 1), 1, instr(substr(name, instr(name, '.') + 1), '.') - 1) task FROM METHOD WHERE lang = 'cs'
Database: codebase_comments
Note: solution path refers to path; method number refers to method_100k.id; method_100k.id = 3;
Question: What is the solution path for method number 3?
SQL: SELECT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.id = 3
Database: codebase_comments
Note: language of method refers to lang; method number refers to method_100k.id; method_100k.id = 28; repository number refers to repoid; repoid = 3;
Question: What is the language of method number 28 that can be found in the repository number 3?
SQL: SELECT METHOD.lang FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.id = 28 AND solution.repoid = 3
Database: codebase_comments
Note: solution refers to solution.id and solutionid; solution.id = 1; solutionid = 1; processing time refers to processedtime; methods refers to name;
Question: What is solution 1's processing time and how many methods have been using this solution?
SQL: SELECT solution.processedtime, count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.solutionid = 1
Database: codebase_comments
Note: methods refers to name; tokenized name refers to nametokenized; nametokenized LIKE 'query language%';
Question: How many methods in the same repository share a tokenized name that begins with "query language..."?
SQL: SELECT count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.nametokenized LIKE 'query language%'
Database: codebase_comments
Note: method number refers to method_100k.id; method_100k.id = 10; intended course of action refers to path;
Question: Please state the API calls for method number 10 and its intended course of action.
SQL: SELECT METHOD.apicalls, solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.id = 10
Database: codebase_comments
Note: methods refers to name; repository that did not have a comment and a summary refers to fullcomment IS NULL AND summary IS NULL;
Question: How many methods in repository 150 did not have a comment and a summary?
SQL: SELECT count(METHOD.solutionid) FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.repoid = 150 AND METHOD.fullcomment IS NULL AND METHOD.summary IS NULL
Database: codebase_comments
Note: comment format refers to commentisxml; method number refers to method_100k.id; method_100k.id = 50; solution path refers to path; path = 'managedfusion_managedfusion\ManagedFusion.sln';
Question: What is the comment format of method number 50 with the solution path "managedfusion_managedfusion\ManagedFusion.sln"?
SQL: SELECT CASE WHEN METHOD.commentisxml = 0 THEN 'isNotXMLFormat' WHEN METHOD.commentisxml = 1 THEN 'isXMLFormat' END format FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.id = 50 AND solution.path = 'managedfusion_managedfusionManagedFusion.sln'
Database: codebase_comments
Note: method refers to name; task of the method refers to the second part of the name after the "."; tokenized name refers to nametokenized; nametokenized = 'string extensions to pascal case';
Question: What is the task method of the tokenized name "string extensions to pascal case "?
SQL: SELECT DISTINCT substr(substr(name, instr(name, '.') + 1), 1, instr(substr(name, instr(name, '.') + 1), '.') - 1) task FROM METHOD WHERE nametokenized = 'string extensions to pascal case'
Database: codebase_comments
Note: tokenized name refers to nametokenized; nametokenized = 'Sky.Excel.ExcelBook.typeConvert';
Question: Provide the tokenized name of the method "Sky.Excel.ExcelBook.TypeConvert".
SQL: SELECT nametokenized FROM METHOD WHERE name = 'Sky.Excel.ExcelBook.TypeConvert'
Database: codebase_comments
Note: github address refers to url; url = 'https://github.com/jeffdik/tachy.git';
Question: How many path does the github address "https://github.com/jeffdik/tachy.git" have?
SQL: SELECT count(DISTINCT solution.path) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.url = 'https://github.com/jeffdik/tachy.git'
Database: codebase_comments
Question: How many watchers does the path "maff_se3ue7\US7.sln" have?
SQL: SELECT repo.watchers FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.path = 'maff_se3ue7US7.sln'
Database: codebase_comments
Note: github address refers to url; solution can be implemented without the need of compliation refers to wascompiled = 1;
Question: List 5 github address that the solutions can be implemented without the need of compilation.
SQL: SELECT repo.url FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.wascompiled = 1 LIMIT 5
Database: codebase_comments
Note: solution path refers to path; tokenized name refers to nametokenized; nametokenized = 'matrix multiply';
Question: What are the solution path of the tokenized name "matrix multiply"?
SQL: SELECT DISTINCT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.nametokenized = 'matrix multiply'
Database: codebase_comments
Note: Xml format refers to commentisxml, github address refers to url; url = 'https://github.com/dogeth/vss2git.git';
Question: How many XML format does the github address "https://github.com/dogeth/vss2git.git" have?
SQL: SELECT count(METHOD.commentisxml) FROM repo INNER JOIN solution ON repo.id = solution.repoid INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE repo.url = 'https://github.com/dogeth/vss2git.git' AND METHOD.commentisxml = 1
Database: codebase_comments
Note: solution path refers to path; sampling time refers to sampledat; sampledat = '636431758961741000';
Question: List 5 solution path that has sampling time of 636431758961741000.
SQL: SELECT DISTINCT solution.path FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.sampledat = 636431758961741000 LIMIT 5
Database: codebase_comments
Note: github address refers to url; solution path refers to path; path = 'joeyrobert_bloomfilter\Datatypes.BloomFilter.sln';
Question: What is the github address of the solution path "joeyrobert_bloomfilter\DataTypes.BloomFilter.sln"?
SQL: SELECT repo.url FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.path = 'joeyrobert_bloomfilterDataTypes.BloomFilter.sln'
Database: codebase_comments
Note: method name refers to name; solution path refers to path; path = 'graffen_NLog.Targets.Syslog\src\NLog.Targets.Syslog.sln';
Question: List all the method name of the solution path "graffen_NLog.Targets.Syslog\src\NLog.Targets.Syslog.sln ".
SQL: SELECT DISTINCT METHOD.name FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.path = 'graffen_NLog.Targets.SyslogsrcNLog.Targets.Syslog.sln'
Database: codebase_comments
Note: tokenized name refers to nametokenized; solution path refers to path; path = 'jurney_P4Backup\P4Backup\P4Backup.sln';
Question: List all the tokenized name of the solution path "jurney_P4Backup\P4Backup\P4Backup.sln ".
SQL: SELECT DISTINCT METHOD.nametokenized FROM solution INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE solution.path = 'jurney_P4BackupP4BackupP4Backup.sln'
Database: codebase_comments
Note: github address refers to url; summary of method refers to summary; summary = 'A test for Decompose';
Question: Provide the github address with the summary of method "A test for Decompose ".
SQL: SELECT repo.url FROM repo INNER JOIN solution ON repo.id = solution.repoid INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE METHOD.summary = 'A test for Decompose'
Database: codebase_comments
Note: how many liked by people refers to stars; solution path refers to path; path = 'ninject_Ninject\Ninject.sln';
Question: How many liked by people does the solution path "ninject_Ninject\Ninject.sln " have?
SQL: SELECT DISTINCT repo.stars FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE solution.path = 'ninject_NinjectNinject.sln'
Database: codebase_comments
Note: solution path refers to path;
Question: How many solution path does the repository with 111 stars, 58 forks, and 111 watchers?
SQL: SELECT count(solution.path) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.stars = 111 AND repo.forks = 58 AND repo.watchers = 111
Database: codebase_comments
Note: average processed time = AVG(processedtime);
Question: What is the average processed time of the solution with a repository of 254 likes, 88 followers, and 254 watchers?
SQL: SELECT cast(sum(solution.processedtime) AS REAL) / count(solution.processedtime) FROM repo INNER JOIN solution ON repo.id = solution.repoid WHERE repo.stars = 254 AND repo.forks = 88 AND repo.watchers = 254
Database: codebase_comments
Note: language code of method refers to lang; github address refers to url; url = 'https://github.com/managedfusion/managedfusion.git';
Question: How many language code of method is used for the github address "https://github.com/managedfusion/managedfusion.git "?
SQL: SELECT count(DISTINCT METHOD.lang) FROM repo INNER JOIN solution ON repo.id = solution.repoid INNER JOIN METHOD ON solution.id = METHOD.solutionid WHERE repo.url = 'https://github.com/managedfusion/managedfusion.git'
Database: trains
Note: east is a direction;
Question: How many trains are there that run in the east direction?
SQL: SELECT count(id) FROM trains WHERE direction = 'east'