{"id":19143627,"url":"https://github.com/ferrewagner/leetcode","last_synced_at":"2026-05-06T15:40:08.234Z","repository":{"id":201882526,"uuid":"138992587","full_name":"FerreWagner/Leetcode","owner":"FerreWagner","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-03T03:41:22.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T15:45:23.746Z","etag":null,"topics":["algorithms","database","leetcode","mysql","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/FerreWagner.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}},"created_at":"2018-06-28T08:54:20.000Z","updated_at":"2018-07-03T03:42:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"979e1dde-44af-4419-9e31-bfdb885f961f","html_url":"https://github.com/FerreWagner/Leetcode","commit_stats":null,"previous_names":["ferrewagner/leetcode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FerreWagner%2FLeetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FerreWagner%2FLeetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FerreWagner%2FLeetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FerreWagner%2FLeetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FerreWagner","download_url":"https://codeload.github.com/FerreWagner/Leetcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240224589,"owners_count":19767771,"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":["algorithms","database","leetcode","mysql","python"],"created_at":"2024-11-09T07:32:20.458Z","updated_at":"2026-05-06T15:40:03.203Z","avatar_url":"https://github.com/FerreWagner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCode Problems #\n\n\n----------\n\n1. Database\n\t\n\t\n\t\u003e Easy\n\n\t\t627. Swap Salary\n\t\tupdate salary set sex = if(sex = 'm', 'f', 'm')\n\t\t\n\t\t596. Classes More Than 5 Students\n\t\tselect c.class from courses c group by c.class having count(distinct c.student) \u003e 4\n\t\t#tips：一个学生同选一门课无效(distinct)\n\n\t\t595. Big Countries\n\t\tselect name, population, area from World where(area \u003e 3000000 or population \u003e 25000000)\n\n\t\t620. Not Boring Movies\n\t\tselect * from cinema where(description != 'boring' and id%2 = 1) order by rating desc\n\n\t\t197. Rising Temperature\n\t\tSELECT w1.Id FROM Weather w1, Weather w2 WHERE w1.Temperature \u003e w2.Temperature AND DATEDIFF(w1.RecordDate, w2.RecordDate) = 1;\n\n\t\t196. Delete Duplicate Emails\n\t\tdelete p1 from Person p1, Person p2 where p1.Email=p2.Email and p1.Id\u003ep2.Id\n\n\t\t183. Customers Who Never Order\n\t\tSELECT Name as Customers FROM Customers c WHERE c.Id NOT IN (SELECT CustomerId FROM Orders o)\n\n\t\t182. Duplicate Emails\n\t\tselect Email from Person group by email having count(Email) \u003e 1\n\n\t\t181. Employees Earning More Than Their Managers\n\t\tselect e.Name as Employee from employee e,employee m where e.managerid=m.id and e.salary\u003em.salary\n\t\t#将表作为两个镜像别名表来对比\n\n\t\t176. Second Highest Salary\n\t\tselect ifnull((select Distinct Salary from Employee order by Salary desc limit 1,1), null) as SecondHighestSalary\n\n\t\t175. Combine Two Tables\n\t\tselect p.FirstName, p.LastName, a.City, a.State from Person p left join Address a on p.PersonId = a.PersonId\n\n\n\n2. Algorithms\n\n3. Shell","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrewagner%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferrewagner%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrewagner%2Fleetcode/lists"}