{"id":21571035,"url":"https://github.com/victor0089/sql","last_synced_at":"2025-06-22T05:05:22.680Z","repository":{"id":200677227,"uuid":"706071679","full_name":"victor0089/SQL","owner":"victor0089","description":"SQL practice","archived":false,"fork":false,"pushed_at":"2023-10-18T08:06:54.000Z","size":202,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T17:08:43.604Z","etag":null,"topics":["sql","sql-server","sqlalchemy","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":null,"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/victor0089.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,"publiccode":null,"codemeta":null}},"created_at":"2023-10-17T08:50:46.000Z","updated_at":"2024-03-17T20:12:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdc355bd-73dc-4bb5-a8e5-c12df2e7386d","html_url":"https://github.com/victor0089/SQL","commit_stats":null,"previous_names":["victor0089/sql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/victor0089/SQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor0089%2FSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor0089%2FSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor0089%2FSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor0089%2FSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victor0089","download_url":"https://codeload.github.com/victor0089/SQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victor0089%2FSQL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261238895,"owners_count":23128879,"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":["sql","sql-server","sqlalchemy","sqlite","sqlite3"],"created_at":"2024-11-24T11:14:42.026Z","updated_at":"2025-06-22T05:05:17.671Z","avatar_url":"https://github.com/victor0089.png","language":null,"readme":"# SQL\nComments for your SQL file:\n```bash\n$ cat my_script.sql\n-- 3 first students in the Batch ID=3\n-- because Batch 3 is the best!\nSELECT id, name FROM students WHERE batch_id = 3 ORDER BY created_at DESC LIMIT 3;\n```\nInstall MySQL 8.0 on Ubuntu 20.04 LTS\n```bash\n$ sudo apt update\n$ sudo apt install mysql-server\npython\n$ mysql --version\nmysql  Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))\n$\n```\nConnect to your MySQL server:\n```bash\n$ sudo mysql\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 11\nServer version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)\n\nCopyright (c) 2000, 2021, Oracle and/or its affiliates.\n\nOracle is a registered trademark of Oracle Corporation and/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the \n```\ncurrent input statement.\n```bash\nmysql\u003e\nmysql\u003e quit\nBye\n$\n```\nUse “container-on-demand” to run MySQL\nIn the container, credentials are root/root\n\nAsk for container Ubuntu 20.04\n* Connect via SSH\n* OR connect via the Web terminal\n* In the container, you should start MySQL before playing with it:\n```bash\n$ service mysql start                                                   \n * Starting MySQL database server mysqld \n$\n$ cat 0-list_databases.sql | mysql -uroot -p                               \nDatabase                                                                                   \ninformation_schema                                                                         \nmysql                                                                                      \nperformance_schema                                                                         \nsys                      \n$\n```\nIn the container, credentials are root/root\nHow to import a SQL dump\n```bash\n$ echo \"CREATE DATABASE hbtn_0d_tvshows;\" | mysql -uroot -p\nEnter password: \n$ curl \"https://s3.amazonaws.com/intranet-projects-files/holbertonschool-higher-level_programming+/274/hbtn_0d_tvshows.sql\" -s | mysql -uroot -p hbtn_0d_tvshows\nEnter password: \n$ echo \"SELECT * FROM tv_genres\" | mysql -uroot -p hbtn_0d_tvshows\nEnter password: \nid  name\n1   Drama\n2   Mystery\n3   Adventure\n4   Fantasy\n5   Comedy\n6   Crime\n7   Suspense\n8   Thriller\n$\n```\n\u003cimg src=\"https://github.com/victor0089/SQL/blob/main/sqljoin.png\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictor0089%2Fsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictor0089%2Fsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictor0089%2Fsql/lists"}