GithubHelp home page GithubHelp logo

chia-hsuan-lee / kaggledbqa Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 4.0 301 KB

Introduction page of a challenging text-to-SQL dataset: KaggleDBQA

License: Other

dataset kaggle kaggle-dataset natural-language-processing question-answering semantic-parsing spider text-to-sql

kaggledbqa's People

Contributors

chia-hsuan-lee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kaggledbqa's Issues

ambiguous questions

I think some questions have alternative queries.


  • file name: GeoNuclearData.json

  • question: 'How many nuclear power plants are in preparation to be used in Japan?'

  • query: 'SELECT count(*) FROM nuclear_power_plants WHERE Country = "Japan" AND Status = "Under Construction"'

  • possible query: "select count(*) from nuclear_power_plants where Country = 'Japan' and Status = 'Planned'"


  • file name: GeoNuclearData.json

  • question: Where is the first BWR type power plant built and located?

  • query: SELECT Longitude, Latitude FROM nuclear_power_plants WHERE ReactorType = "BWR" ORDER BY ConstructionStartAt LIMIT 1

  • possible query: select Name, Country from nuclear_power_plants where ReactorType = 'BWR' order by ConstructionStartAt limit 1


  • file name: GeoNuclearData.json

  • question: 'How many PHWR are there today?'

  • query: "select count(*) from nuclear_power_plants where ReactorType = 'PHWR' and Status != 'Shutdown';"

  • possible query: 'SELECT count(*) FROM nuclear_power_plants WHERE ReactorType = "PHWR"'


  • file name: GreaterManchesterCrime.json

  • question: 'Which area do most of the crimes happen?'

  • query: 'SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1'

  • possible query: 'select LSOA from GreaterManchesterCrime group by LSOA order by count(*) desc limit 1;'


  • file name: GreaterManchesterCrime.json

  • question: Where is the safest area?

  • query: SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) LIMIT 1

  • possible query: select LSOA from GreaterManchesterCrime group by LSOA order by count(*) asc limit 1

sql query to fix

I think there are SQL queries that need to be fixed.
(Thank you for sharing DB files & questions)


  • file name: GeoNuclearData.json

  • question: "What are the top 3 countries which have the most nuclear power plants?"

  • query (as is): "SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY sum(Name) DESC LIMIT 3"

  • query (to be): "SELECT Country FROM nuclear_power_plants GROUP BY Country ORDER BY count(*) DESC LIMIT 3"


  • file name: GeoNuclearData.json

  • question: "How many countries have at least 3 nuclear power plants?"

  • query (as is): "SELECT Country FROM nuclear_power_plants Group BY Country HAVING count(Name) > 3"

  • query (to be): "select count(*) from (select Country from nuclear_power_plants group by Country having count(*) >= 3)"


  • file name: GreaterManchesterCrime.json

  • question: 'When was the last instance of a violent or sexual offense in Manchester?'

  • query (as is): SELECT CrimeID FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" ORDER BY CrimeTS DESC LIMIT 1

  • query (to be): select max(CrimeTS) from GreaterManchesterCrime where Type = 'Violence and sexual offences'


  • file name: GreaterManchesterCrime.json

  • question: 'What is the top 3 area of crime conducted?'

  • query (as is): SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 3

  • query (to be): select LSOA from GreaterManchesterCrime group by LSOA order by count(*) desc limit 3;


  • file name: GreaterManchesterCrime.json

  • question: Which neighborhood/area has the highest burglary rate?

  • query (as is): SELECT Location FROM GreaterManchesterCrime WHERE Type = "Burglary" GROUP BY Location ORDER BY count(*) DESC LIMIT 1

  • query (to be): select LSOA from GreaterManchesterCrime where Type = 'Burglary' group by LSOA order by count(*) desc limit 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.