mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

【SQL进阶教程】HAVING子句的力量

Posted on 2019-09-03 | In SQL
表的记录是没有顺序的,而且SQL也没有排序的运算符。SQL会将多条记录作为一个集合来处理。 寻找缺失的编号假设现有一张带有“连续编号”列的表,如表SeqTbl所示。查询这张表里是否存在数据丢失。 如果将表整体看作一个集合,就可以像下面这样解决这个问题。 123SELECT '存在缺失的编号' AS ...
Read more »

[LeetCode] Problem 462 - Minimum Moves to Equal Array Elements II

Posted on 2019-09-03 | In Algorithm , LeetCode
Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected e ...
Read more »

[LeetCode] Problem 453 - Minimum Moves to Equal Array Elements

Posted on 2019-09-03 | In Algorithm , LeetCode
Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n ...
Read more »

[LeetCode] Problem 447 - Number of Boomerangs

Posted on 2019-09-02 | In Algorithm , LeetCode
Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k) such that the distance between i and j equals ...
Read more »

[LeetCode] Problem 443 - String Compression

Posted on 2019-09-02 | In Algorithm , LeetCode
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele ...
Read more »

【SQL进阶教程】三值逻辑和NULL

Posted on 2019-09-02 | In SQL
NULL既不是值也不是变量。NULL只是一个表示“没有值”的标记。对NULL使用比较谓词后得到的结果总是unknown。真值unknown是因关系数据库采用了NULL而被引入的的“第三个真值”,是明确的布尔型的真值。 要想解决NULL带来的各种问题,最佳方法应该是往表里添加NOT NULL约束来尽力 ...
Read more »

The English We Speak 2

Posted on 2019-09-02 | In English
To downsizeto describe cutting a number of jobs and making employees redundant.some people have started applying the term to their own situations. Ex ...
Read more »

[LintCode] Problem 648 - Unique Word Abbreviation

Posted on 2019-09-01 | In Algorithm , LintCode
An abbreviation of a word follows the form<first letter><number><last letter>. Below are some examples of word abbreviations: 123456 ...
Read more »

[LintCode] Problem 779 - Generalized Abbreviation

Posted on 2019-09-01 | In Algorithm , LintCode
Write a function to generate the generalized abbreviations of a word.(order does not matter) ExampleNo.1Input:word = “word”, Output:[“word”, “1ord”, “ ...
Read more »

【SQL进阶教程】自连接的用法

Posted on 2019-09-01 | In SQL
与多表之间进行的普通连接相比,自连接的性能开销更大(特别是与非等值连接结合使用的时候),因此用于自连接的列推荐使用主键或者在相关列上建立索引。 可重排列、排列、组合假设有一张存放了商品名称及价格的表,表里有“苹果、橘子、香蕉”这3条记录。在生成用于查询销售额的报表等的时候,有时会需要获取这些商品的组 ...
Read more »
1…141516…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces