{"id":19399063,"url":"https://github.com/poboisvert/docker_sql_csv_loader","last_synced_at":"2026-04-29T19:32:52.645Z","repository":{"id":180325282,"uuid":"525461772","full_name":"poboisvert/docker_sql_csv_loader","owner":"poboisvert","description":"[SQL] A Docker image with a SQL UI to practice queries with loaded CSV files","archived":false,"fork":false,"pushed_at":"2022-08-18T02:03:09.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T11:12:39.550Z","etag":null,"topics":["docker","postgres","queries","sql","sqlpad"],"latest_commit_sha":null,"homepage":"","language":null,"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/poboisvert.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,"publiccode":null,"codemeta":null}},"created_at":"2022-08-16T16:35:01.000Z","updated_at":"2022-08-20T00:52:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"d309fc11-1ea6-4de7-90b9-07ee6d30afe3","html_url":"https://github.com/poboisvert/docker_sql_csv_loader","commit_stats":null,"previous_names":["poboisvert/docker_sql_csv_loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poboisvert/docker_sql_csv_loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2Fdocker_sql_csv_loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2Fdocker_sql_csv_loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2Fdocker_sql_csv_loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2Fdocker_sql_csv_loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poboisvert","download_url":"https://codeload.github.com/poboisvert/docker_sql_csv_loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poboisvert%2Fdocker_sql_csv_loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","postgres","queries","sql","sqlpad"],"created_at":"2024-11-10T11:08:03.618Z","updated_at":"2026-04-29T19:32:52.620Z","avatar_url":"https://github.com/poboisvert.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### Purpose\n\n- I want to create SQL and have an UI to create/validate queries\n- I need to confirm my SQL tables will work with the primary and foreign keys\n- I want to load csv into SQL and see if my tables work\n\n### Installation\n\n- CSV files are located: /data\n\n- SQL ORM: /sql\n\n- Install Docker \u0026\u0026 run \"docker-compose up\" in the root folder \n\n\n### SQL Queries\n\n`SELECT * FROM customers`\n\n`SELECT * FROM bookings`\n\n`SELECT * FROM restaurants`\n\n--How many days has each customer visited the restaurant? \n\n`SELECT customer_id, COUNT(DISTINCT(bookings_date)) AS visit_count FROM bookings GROUP BY customer_id;`\n\n\n-- What was the first restaurant visited by each customer?\n\n```\nWITH order_booking AS\n(\nSELECT\ncustomer_id,\nr.name as restaurant_name,\nDENSE_RANK() OVER(PARTITION BY customer_id ORDER BY bookings_date) AS rank\nFROM bookings AS b\nJOIN customers AS c\nON c.id = b.customer_id\nJOIN restaurants AS r\nON c.restaurants_id = r.id\n)\n\nSELECT\ncustomer_id, restaurant_name\nFROM order_booking\nWHERE rank = 1\nGROUP BY customer_id, restaurant_name;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoboisvert%2Fdocker_sql_csv_loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoboisvert%2Fdocker_sql_csv_loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoboisvert%2Fdocker_sql_csv_loader/lists"}