{"id":21643701,"url":"https://github.com/akshayxml/mini-sql-engine","last_synced_at":"2025-03-19T08:46:57.220Z","repository":{"id":69055121,"uuid":"332411259","full_name":"akshayxml/Mini-SQL-Engine","owner":"akshayxml","description":"A mini sql engine which can run a subset of SQL queries using command line interface.","archived":false,"fork":false,"pushed_at":"2021-01-24T09:40:59.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T04:09:48.133Z","etag":null,"topics":["database","mini-sql-engine","sql-queries"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akshayxml.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-01-24T09:36:15.000Z","updated_at":"2024-02-10T12:44:10.000Z","dependencies_parsed_at":"2023-07-06T21:01:16.568Z","dependency_job_id":null,"html_url":"https://github.com/akshayxml/Mini-SQL-Engine","commit_stats":null,"previous_names":["akshayxml/mini-sql-engine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshayxml%2FMini-SQL-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshayxml%2FMini-SQL-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshayxml%2FMini-SQL-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshayxml%2FMini-SQL-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshayxml","download_url":"https://codeload.github.com/akshayxml/Mini-SQL-Engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244394458,"owners_count":20445631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mini-sql-engine","sql-queries"],"created_at":"2024-11-25T05:35:35.528Z","updated_at":"2025-03-19T08:46:57.197Z","avatar_url":"https://github.com/akshayxml.png","language":"Python","readme":"# Mini SQL Engine\n\nA mini sql engine which can run a subset of SQL queries using command line interface.\n\n## Dataset:\n\n1. csv files for tables.\n   - If a file is : File1.csv , the table name should be File1\n   - There should be no tab separation or space separation, but the values can be in double quotes or without quotes.\n2. All the elements in files should be integers.\n3. A file named: metadata.txt should be given which will have the following structure for each table:\n   ```\u003cbegin_table\u003e\n    \u003ctable_name\u003e\n    \u003cattribute 1\u003e\n    ..\n    ..\n    \u003cattribute N\u003e\n    \u003cend_table\u003e\n4. Column names should be unique among all the tables. So column names should not​ preceded by table names in SQL queries.\n\n## Type of Queries\n\nThe the following set of queries are supported:\n1. Project​ Columns(could be any number of columns) from one or more tables :\n   - `Select * from table_name`;\n   - `Select col1, col2 from table_name`;\n2. Aggregate functions​: Simple aggregate functions on a single column. Sum, average, max, min and count. \n    - `Select max(col1) from table_name`;\n3. Select/project with ​distinct​ from one table: (distinct of a pair of values indicates the pair should be distinct) \n    - `Select distinct col1, col2 from table_name;`\n4. Select with ​WHERE​ from one or more tables :\n    - `Select col1,col2 from table1,table2 where col1 = 10 AND col2 = 20;`\n    - In the where queries, there should be a maximum of one AND/ORoperator with no NOT operators.\n    - Relational operators that are to be handled in the assignment, the operators include \"\u003c , \u003e, \u003c=, \u003e=, =\".\n5.  Select/Project Columns(could be any number of columns) from table using “​group by​”:  \n    - `Select col1, COUNT(col2) from table_name group by col1.`\n    - In the group by queries, Sum/Average/Max/Min/Count can be used as aggregate functions.\n6. Select/Project Columns(could be any number of columns) from table in ascending/descending order according to a column using “​order by”​:\n    - `Select col1,col2 from table_name order by col1 ASC|DESC`.\n    - At max only one column can be used to sort the rows.\n    - Query can have multiple tables\n\n## Format of Input :\n\n`python3 sql_engine.py \"\u003cSQL Query\u003e\"`\n\n## Format of Output  :\n\n    \u003cTable1.column1,Table1.column2,...TableN.columnM\u003e\n                        Row 1 \n                        Row 2 \n                        ....... \n                        Row N\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshayxml%2Fmini-sql-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshayxml%2Fmini-sql-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshayxml%2Fmini-sql-engine/lists"}