- 博客(13)
- 收藏
- 关注
原创 Leetcode: Department Highest Salary
The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.+—-+——-+——–+————–+ | Id | Name | Salary | DepartmentId | +—-+——-+——–+————
2015-03-19 18:10:41 1098
原创 Euler: Non-abundant sums
ProblemA perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which me
2015-03-18 23:05:45 807
原创 Leetcode: Rank Scores
Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value. I
2015-03-18 21:59:05 999
原创 Leetcode: Consecutive Numbers
Write a SQL query to find all numbers that appear at least three times consecutively. +—-+—–+ | Id | Num | +—-+—–+ | 1 | 1 | | 2 | 1 | | 3 | 1 | | 4 | 2 | | 5 | 1 | | 6 | 2 |
2015-03-16 22:20:32 765
原创 Leetcode : Customers Who Never Order
Now we’ve got two table. One customer table for customerid and their names, One Order tablefor customers’ Id that bought something. We will find the customers that in the customer table but not in ord
2015-03-15 22:43:40 734
原创 Leetcode: find all duplicate
Leetcode : Duplicate EmailsWrite a SQL query to find all duplicate emails in a table named Person. +—-+———+ | Id | Email | +—-+———+ | 1 | [email protected] | | 2 | [email protected] | | 3 | [email protected] | +—-+———+
2015-03-15 22:27:45 847
原创 Leetcode: 相关子查询
Leetcode : Employees Earning More Than Their Managers+—-+——-+——–+———–+ | Id | Name | Salary | ManagerId | +—-+——-+——–+———–+ | 1 | Joe | 70000 | 3 | | 2 | Henry | 80000 | 4 |
2015-03-14 19:01:44 725
原创 Leetcode: Second Highest Salary
Write a SQL query to get the second highest salary from the Employee table.+—-+——–+ | Id | Salary | +—-+——–+ | 1 | 100 | | 2 | 200 | | 3 | 300 | +—-+——–+ For example, given the abov
2015-03-14 00:00:58 748
原创 Euler: Digit fifth powers
Problem 30: Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:1634 = 1^4 + 6^4 + 3^4 + 4^4 8208 = 8^4 + 2^4 + 0^4 + 8^4 9474 = 9^4 + 4^4 + 7^4
2015-03-12 19:54:15 701
原创 Euler: Counting Sundays
Problem 19. You are given the following information, but you may prefer to do some research for yourself.1 Jan 1900 was a Monday.Thirty days has September, April, June and November. All the rest hav
2015-03-11 21:07:22 615
原创 Euler: Names scores
Problem 22: Using names.txt, a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this
2015-03-10 22:51:31 690
原创 Euler: Amicable numbers
Amicable numbersThis is the 21st issue of Euler Project Challenge Game.Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).
2015-03-09 19:03:21 1409
原创 Leetcode:Excel Sheet Column Number
Leetcode增加了Accepted Solutions Runtime Distribution,能够看到自己的代码的效率和别人比起来在怎么样的位子。CSDN博客终于推出了Markdown格式写博客。
2015-03-09 17:27:30 1479
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人