
SQL
_dingzhen
一枚可爱又迷人的后端coder!
展开
-
Exchange Seats
Exchange Seats description: Mary is a teacher in a middle school and she has a table seat storing students’ names and their corresponding seat ids. The column id is continuous increment. Mary wants to...原创 2020-03-28 22:24:23 · 340 阅读 · 0 评论 -
Rising Temperature
Rising Temperature description: Given a Weather table, write a SQL query to find all dates’ Ids with higher temperature compared to its previous (yesterday’s) dates. +---------+------------------+---...原创 2020-03-27 16:44:48 · 259 阅读 · 0 评论 -
Delete Duplicate Emails
Delete Duplicate Emails description: Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. +----+------------------+ | I...原创 2020-03-27 10:14:49 · 215 阅读 · 0 评论 -
Department Top Three Salaries
Department Top Three Salaries description: The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id. +----+-------+--------+--------------+ |...原创 2020-03-25 23:11:17 · 193 阅读 · 0 评论 -
Second Highest Salary and Nth Highest Salary
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 | +----+...原创 2020-03-16 11:21:45 · 124 阅读 · 0 评论 -
Combine Two Tables
[Combine Two Tables] Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId | int | | FirstName | varchar | | LastName | varchar | +--------...原创 2020-03-16 10:23:41 · 170 阅读 · 0 评论