{"id":30850899,"url":"https://github.com/adimyy/sql-leetcode","last_synced_at":"2025-09-07T06:39:58.839Z","repository":{"id":312294477,"uuid":"1047008508","full_name":"ADIMYY/SQL-LeetCode","owner":"ADIMYY","description":"This repository contains my solutions to LeetCode SQL problems.","archived":false,"fork":false,"pushed_at":"2025-08-29T15:49:00.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T18:41:19.515Z","etag":null,"topics":["postgresql","sql"],"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/ADIMYY.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T15:32:23.000Z","updated_at":"2025-08-29T15:49:05.000Z","dependencies_parsed_at":"2025-08-29T18:41:21.923Z","dependency_job_id":"0d6394f6-e895-4a64-aa96-fce3e1585c44","html_url":"https://github.com/ADIMYY/SQL-LeetCode","commit_stats":null,"previous_names":["adimyy/sql-leetcode"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ADIMYY/SQL-LeetCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADIMYY%2FSQL-LeetCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADIMYY%2FSQL-LeetCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADIMYY%2FSQL-LeetCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADIMYY%2FSQL-LeetCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ADIMYY","download_url":"https://codeload.github.com/ADIMYY/SQL-LeetCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADIMYY%2FSQL-LeetCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005336,"owners_count":25205934,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["postgresql","sql"],"created_at":"2025-09-07T06:39:57.659Z","updated_at":"2025-09-07T06:39:58.822Z","avatar_url":"https://github.com/ADIMYY.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCode SQL Solutions\n\nThis repository contains my solutions to **LeetCode SQL problems**.  \nThe goal of this repo is to **practice SQL queries**, improve my problem-solving skills, and track my progress over time.\n\nI will keep updating this repository regularly as I solve more SQL problems.\n---\n\n💡 Feel free to check out the solutions, suggest improvements, or discuss alternative approaches!\n\n---\n1 - [1757. Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT product_id FROM Products \nWHERE low_fats = 'Y' \nAND recyclable = 'Y';\n```\n---\n\n2 - [584. Find Customer Referee](https://leetcode.com/problems/find-customer-referee/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT name FROM Customer\nWHERE referee_id != 2 OR \nreferee_id IS NULL;\n```\n---\n\n3 - [595. Big Countries](https://leetcode.com/problems/big-countries/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT name, population, area FROM World\nWHERE area \u003e= 3000000 OR\npopulation \u003e= 25000000;\n```\n---\n\n4 - [1148. Article Views I](https://leetcode.com/problems/article-views-i/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT DISTINCT author_id AS id \nFROM Views\nWHERE author_id = viewer_id\nORDER BY author_id;\n```\n\n---\n\n5 - [1683. Invalid Tweets](https://leetcode.com/problems/invalid-tweets/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT tweet_id FROM Tweets \nWHERE LENGTH(content) \u003e 15;\n```\n\n---\n\n6 - [1378. Replace Employee ID With The Unique Identifier](https://leetcode.com/problems/replace-employee-id-with-the-unique-identifier/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT eu.unique_id, e.name FROM Employees AS e\nLEFT JOIN EmployeeUNI AS eu\nON e.id = eu.id;\n```\n\n---\n\n7 - [1068. Product Sales Analysis I](https://leetcode.com/problems/product-sales-analysis-i/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```SQL\nSELECT p.product_name, s.year, s.price FROM Sales AS s\nINNER JOIN Product AS p\nON s.product_id = p.product_id;\n```\n\n---\n\n8 - [1581. Customer Who Visited but Did Not Make Any Transactions](https://leetcode.com/problems/customer-who-visited-but-did-not-make-any-transactions/description/?envType=study-plan-v2\u0026envId=top-sql-50)\n```sql\nSELECT V.customer_id, COUNT(V.visit_id) AS count_no_trans\nFROM Visits V\nLEFT JOIN Transactions T ON V.visit_id = T.visit_id\nWHERE T.transaction_id IS NULL\nGROUP BY V.customer_id;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadimyy%2Fsql-leetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadimyy%2Fsql-leetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadimyy%2Fsql-leetcode/lists"}