{"id":15057485,"url":"https://github.com/vnegi10/sql_data_analysis","last_synced_at":"2026-01-02T08:12:26.785Z","repository":{"id":235528129,"uuid":"680451132","full_name":"vnegi10/SQL_data_analysis","owner":"vnegi10","description":"Analysis of NIPS SQLite database using sqlite3 and Julia","archived":false,"fork":false,"pushed_at":"2023-08-19T09:50:15.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T23:02:43.129Z","etag":null,"topics":["data-science","database","julialang","sqlite3","storj-network"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vnegi10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-19T09:30:06.000Z","updated_at":"2023-08-19T09:51:33.000Z","dependencies_parsed_at":"2024-04-23T19:07:24.914Z","dependency_job_id":"e8fba2f9-fd6d-4950-bc3a-02d904adbd08","html_url":"https://github.com/vnegi10/SQL_data_analysis","commit_stats":null,"previous_names":["vnegi10/sql_data_analysis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnegi10%2FSQL_data_analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnegi10%2FSQL_data_analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnegi10%2FSQL_data_analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vnegi10%2FSQL_data_analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vnegi10","download_url":"https://codeload.github.com/vnegi10/SQL_data_analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243761930,"owners_count":20343970,"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":["data-science","database","julialang","sqlite3","storj-network"],"created_at":"2024-09-24T22:07:03.858Z","updated_at":"2026-01-02T08:12:26.746Z","avatar_url":"https://github.com/vnegi10.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SQL_data_analysis\n\nThis repository contains a sample SQLite database (NIPS - Neural Information Processing System\npapers data) obtained from [Kaggle](https://www.kaggle.com/datasets/benhamner/nips-papers?select=database.sqlite).\n\nPractice queries are present as sql files. The `sqlite3`\n[command-line](https://www.sqlite.org/cli.html) tool can be used to\nperform SQL queries on the database.\n\nAdditionally, the same database can also be analyzed by converting relevant\ntables to a Julia DataFrame. The relevant steps are discussed in this \n[blog post](https://vnegi.hashnode.dev/working-with-sqlite-database-in-julia).\n\n## Installation\n\n### SQLite command-line tool on Ubuntu\n    $ sudo apt install sqlite3\n    $ sqlite3 -version\n    ## 3.37.2 2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5dalt1\n\n### Pluto.jl in Julia\n    using Pkg\n    Pkg.add(\"Pluto\")\n    using Pluto\n    Pluto.run()\n\nOnce everthing is set up, clone this repository and open **SQL_data_notebook.jl** in your \nPluto browser window. That's it, you should be good to go!\n\n## Examples for using sqlite3\n\nOpen a database and check the schema:\n```\nsqlite\u003e .open nips_papers.sqlite\nsqlite\u003e .schema\nCREATE TABLE papers (\n    id INTEGER PRIMARY KEY,\n    year INTEGER,\n    title TEXT,\n    event_type TEXT,\n    pdf_name TEXT,\n    abstract TEXT,\n    paper_text TEXT);\nCREATE TABLE authors (\n    id INTEGER PRIMARY KEY,\n    name TEXT);\nCREATE TABLE paper_authors (\n    id INTEGER PRIMARY KEY,\n    paper_id INTEGER,\n    author_id INTEGER);\nCREATE INDEX paperauthors_paperid_idx ON paper_authors (paper_id);\nCREATE INDEX paperauthors_authorid_idx ON paper_authors (author_id);\n```\n\nSelect specific rows based on a condition:\n```\nsqlite\u003e SELECT papers.year, papers.title\n   ...\u003e FROM papers\n   ...\u003e WHERE year = 2017\n   ...\u003e LIMIT 10;\n2017|Wider and Deeper, Cheaper and Faster: Tensorized LSTMs for Sequence Learning\n2017|Concentration of Multilinear Functions of the Ising Model with Applications to Network Data\n2017|Deep Subspace Clustering Networks\n2017|Attentional Pooling for Action Recognition\n2017|On the Consistency of Quick Shift\n2017|Breaking the Nonsmooth Barrier: A Scalable Parallel Method for Composite Optimization\n2017|Dual-Agent GANs for Photorealistic and Identity Preserving Profile Face Synthesis\n2017|Dilated Recurrent Neural Networks\n2017|Hunt For The Unique, Stable, Sparse And Fast Feature Learning On Graphs\n2017|Scalable Generalized Linear Bandits: Online Computation and Hashing\n\n```\n\nChange mode to table:\n```\nsqlite\u003e .mode table\nsqlite\u003e .mode\ncurrent output mode: table\n```\n\nPerform JOINS while reading commands from a file:\n```\n\u003e cat find_authors.sql\nSELECT papers.year, papers.title, paper_authors.author_id, authors.name\nFROM papers\nINNER JOIN paper_authors ON papers.id = paper_authors.paper_id\nINNER JOIN authors ON authors.id = paper_authors.author_id\nWHERE year == 2012\nLIMIT 10;\n\nsqlite\u003e .read find_authors.sql\n+------+----------------------------------------------------------------------------------+-----------+--------------------+\n| year |                                      title                                       | author_id |        name        |\n+------+----------------------------------------------------------------------------------+-----------+--------------------+\n| 2012 | Locally Uniform Comparison Image Descriptor                                      | 5507      | Andrew Ziegler     |\n| 2012 | Locally Uniform Comparison Image Descriptor                                      | 5508      | Eric Christiansen  |\n| 2012 | Locally Uniform Comparison Image Descriptor                                      | 5509      | David Kriegman     |\n| 2012 | Locally Uniform Comparison Image Descriptor                                      | 2723      | Serge J. Belongie  |\n| 2012 | Learning from Distributions via Support Measure Machines                         | 5654      | Krikamol Muandet   |\n| 2012 | Learning from Distributions via Support Measure Machines                         | 1361      | Kenji Fukumizu     |\n| 2012 | Learning from Distributions via Support Measure Machines                         | 5655      | Francesco Dinuzzo  |\n| 2012 | Learning from Distributions via Support Measure Machines                         | 1472      | Bernhard Sch?lkopf |\n| 2012 | Finding Exemplars from Pairwise Dissimilarities via Simultaneous Sparse Recovery | 4951      | Ehsan Elhamifar    |\n| 2012 | Finding Exemplars from Pairwise Dissimilarities via Simultaneous Sparse Recovery | 3341      | Guillermo Sapiro   |\n+------+----------------------------------------------------------------------------------+-----------+--------------------+\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnegi10%2Fsql_data_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvnegi10%2Fsql_data_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnegi10%2Fsql_data_analysis/lists"}