随笔分类 - mysql
摘要: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 |
阅读全文
摘要:Write a SQL query to find all duplicate emails in a table named Person. + + + | Id | Email | + + + | 1 | a@b.com | | 2 | c@d.com | | 3 | a@b.com | + +
阅读全文
摘要: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 |
阅读全文
摘要:The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id. + + + + + |
阅读全文
摘要: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 num
阅读全文
摘要:Write a SQL query to get the nth highest salary from the Employee table. + + + | Id | Salary | + + + | 1 | 100 | | 2 | 200 | | 3 | 300 | + + + For exa
阅读全文
摘要:Write a SQL query to get the second highest salary from the Employee table. + + + | Id | Salary | + + + | 1 | 100 | | 2 | 200 | | 3 | 300 | + + + For
阅读全文
摘要:Table: Person + + + | Column Name | Type | + + + | PersonId | int | | FirstName | varchar | | LastName | varchar | + + + PersonId is the primary key c
阅读全文

浙公网安备 33010602011771号