Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!

LintCode上的SQL教程对应的所有AC答案 PDF 下载


分享到:
时间:2021-06-23 07:22来源:http://www.java1234.com 作者:转载  侵权举报
LintCode上的SQL教程对应的所有AC答案 PDF 下载
失效链接处理
LintCode上的SQL教程对应的所有AC答案 PDF 下载


本站整理下载:
提取码:od2k 
 
 
相关截图:
 
主要内容:

LEVEL1:
2045 · Output Hello LintCode
SELECT "Hello LintCode!";
2013 · Check the name of the teacher
SELECT `name` FROM `teachers`
2007 · Check course name and class size
SELECT `name`,`student_count` FROM courses
2009 · Query all teachers
SELECT * FROM `teachers`
1981 · Check the nationality of all teachers
SELECT DISTINCT country FROM teachers
2011 · Search for information on courses with more than 1000 participants
SELECT * FROM `courses` WHERE `student_count`>1000
2012 · Find course information for the course named Artificial Intelligence
SELECT * FROM courses WHERE `name`= 'Artificial Intelligence';
2017 · Inserting SQL course information into the course table
INSERT INTO courses VALUES (14,"SQL",200,"2021-02-25",1)
2021 · Insert teacher information into the specified column of the teachers table
INSERT INTO `teachers` (`name`,`email`,`age`,`country`) VALUES
('XiaoFu','XiaoFu@lintcode.com',20,'CN');
2020 · Update on the number of students choosing artificial intelligence
UPDATE `courses` SET `student_count`=500 WHERE `name`='Artificial
Intelligence'
2004 · Delete all courses until 2020
DELETE FROM `courses` WHERE `created_at`<'2020-1-1'
2019 · Delete all rows in the table
DELETE FROM `courses`
LEVEL2:
1952 · Query teachers over 20 years old
SELECT * FROM `teachers` WHERE `age`>20
1953 · Query the name of the Chinese teacher
SELECT `name` FROM `teachers` WHERE `country`='CN'
1957 · Inquire about courses starting before May 2020
SELECT `name`,`created_at` FROM `courses`
WHERE `created_at`>='2020-1-1' AND `created_at`<'2020-5-1'
1958 · Query the courses that meet the conditions taught by the specified teacher
SELECT * FROM `courses`
WHERE `teacher_id`=4 AND `student_count`>500
2001 · Query the course information of 'Web' or 'Big Data'
SELECT * FROM `courses`
WHERE `name`='Web'
OR `name`='Big Data';
2040 · Search for courses with an instructor id of less than 3 and more than 800 students
SELECT * FROM `courses`
WHERE (NOT `teacher_id`=3)
AND (`student_count`>800);
1960 · Query course information for a specific time
SELECT * FROM `courses`
WHERE created_at IN ('2021-1-1','2021-1-3')
1962 · Query courses with teacher id other than 1 and 3
SELECT `name` FROM courses WHERE `teacher_id` NOT IN(1,3)
1964 · Query for course information about the number of students within the specified range
SELECT * FROM `courses` WHERE `student_count` BETWEEN 50 AND 55;
1972 · Inquire about Chinese and Japanese teachers who have e-mail addresses
SELECT * FROM teachers
WHERE (email IS NOT NULL)
AND (`country`='CN' OR `country`='JP');
1974 · Query teacher information by email
SELECT `name`,`email` FROM `teachers`
WHERE `email` LIKE '%@qq.com';
1982 · Check the age of teachers and sort them in ascending order
SELECT DISTINCT `age` FROM `teachers`
ORDER BY `age`;
1977 · Sorted by age of Chinese teachers in descending order
SELECT * FROM `teachers`
WHERE `country`='CN'
ORDER BY `age` DESC;
1980 · Search for the oldest Chinese teacher
SELECT * FROM `teachers`
WHERE `country`='CN'
ORDER BY `age` DESC
LIMIT 1;

 

------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐