{"id":19874164,"url":"https://github.com/pythoninthegrass/learn_sql","last_synced_at":"2025-07-21T03:32:29.929Z","repository":{"id":198083047,"uuid":"700042907","full_name":"pythoninthegrass/learn_sql","owner":"pythoninthegrass","description":"Follows LearnSQL course content with local dev scaffolding","archived":false,"fork":false,"pushed_at":"2025-02-07T23:03:40.000Z","size":143,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T01:25:58.390Z","etag":null,"topics":["docker","mysql","postgres","python","sql"],"latest_commit_sha":null,"homepage":"https://learnsql.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":["pythoninthegrass"]}},"created_at":"2023-10-03T20:43:48.000Z","updated_at":"2023-10-03T20:50:01.000Z","dependencies_parsed_at":"2024-11-12T16:22:46.264Z","dependency_job_id":"80cda176-9685-4a98-bb2d-6d08d91b2acf","html_url":"https://github.com/pythoninthegrass/learn_sql","commit_stats":null,"previous_names":["pythoninthegrass/learn_sql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pythoninthegrass/learn_sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Flearn_sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Flearn_sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Flearn_sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Flearn_sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/learn_sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Flearn_sql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266235407,"owners_count":23897179,"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":["docker","mysql","postgres","python","sql"],"created_at":"2024-11-12T16:22:03.958Z","updated_at":"2025-07-21T03:32:29.914Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Shell","readme":"# learn_sql\n\nSmattering of content from [LearnSQL.com](https://learnsql.com/) (née [Vertabelo Academy](https://academy.vertabelo.com/)).\n\n## Setup\n* Install\n  * [editorconfig](https://editorconfig.org/)\n  * [asdf](https://asdf-vm.com/guide/getting-started.html#_2-download-asdf)\n  * [poetry](https://python-poetry.org/docs/)\n  * [docker-compose](https://docs.docker.com/compose/install/)\n\n## Quickstart\n```bash\n# install python\nasdf install python 3.11.5\n\n# install poetry\nasdf install poetry 1.6.1\n\n# spin up database container\nλ ./bin/bootstrap\nWhich database do you want to use?\n1) mysql\n2) postgres\nEnter your choice: 1\nMySQL is already running. Skipping...\nStarting container...\nCreating database...\nSetting up database...\nConnecting to database...\nmysql\u003e \n\n#!DANGER WILL ROBINSON!: replaces existing table and values\n# import csv\nλ poetry shell\nλ ./bin/import_data.py ./course/insert-update-delete/intro/dish.csv dish\n\u003cmysql.connector.connection_cext.CMySQLConnection object at 0x10630d3d0\u003e\nData imported successfully\n\n# connect to db\nλ docker exec -it some-mysql bash\nroot@6c778a74e8a3:/# mysql -u root -p -h localhost\nEnter password:\n\u003cSNIP\u003e\n\nmysql\u003e USE db;\nmysql\u003e SELECT * FROM dish;\n+------+-------------+-----------------+-------+\n| id   | type        | name            | price |\n+------+-------------+-----------------+-------+\n|    1 | starter     | Prawn Salad     |    13 |\n|    2 | starter     | Spring Scrolls  |    11 |\n|    3 | main course | Asian Noodles   |    25 |\n|    4 | main course | Pork Roast      |    32 |\n|    5 | main course | Chicken Nuggets |    24 |\n|    6 | main course | Pizza Italiana  |    30 |\n|    7 | dessert     | Peach Cobbler   |    10 |\n|    8 | dessert     | Cherry Brownies |    12 |\n+------+-------------+-----------------+-------+\n8 rows in set (0.01 sec)\n\nmysql\u003e exit;\nBye\n```\n\n## TODO\n* Finish course(s)\n* Python\n  * Add properties test (hypothesis)\n* Test postgres\n* Add docker shim\n\n## Further Reading\n[mysql - Official Image | Docker Hub](https://hub.docker.com/_/mysql/)\n\n[postgres - Official Image | Docker Hub](https://hub.docker.com/_/postgres)\n\n[Python Database Tutorials – Real Python](https://realpython.com/tutorials/databases/)\n\n[TablePlus | Modern, Native Tool for Database Management](https://tableplus.com/)\n","funding_links":["https://github.com/sponsors/pythoninthegrass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Flearn_sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Flearn_sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Flearn_sql/lists"}