自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (1)
  • 收藏
  • 关注

原创 牛客网SQL

SQL1 查找最晚入职员工的所有信息# 方法1:使用子查询--获取所有最晚的hire_date,然后把与其相等的记录选出来,可以选多条-- date类型的数据越大,表示时间越接近现在,即最晚,使用MAX()函数-- where语句使用=和in都可得到结果SELECT *FROM employeesWHERE hire_date = ( SELECT MAX(hire_date) FROM employees);# 方法2:使用limit或者offset

2021-04-21 14:19:08 328

原创 SQL学习总结

一、为什么要学习数据库二、数据库的相关概念DBMS、 DB、 SQL DB: database 数据库,存储一系列有组织数据的容器 DBMS:Database Management System 数据库管理系统,使用DBMS管理和维护DB SQL:StructureQueryLan 结构化查询语言,程序员用于和DBMS通信的语言三、数据库存储数据的特点数据先放在表中,表再放在库中 一个库可以有多张表,每张表都有自己的唯一标识名 一张表的设计,类似于Java中‘类’的设计/表中字段的设

2021-03-17 16:07:53 419

原创 SQL学习笔记——DDL语言

说明:Date Define Language数据定义语言,用于对数据库和表的管理和操作1库的管理一、创建数据库CREATE DATABASE stuDB;CREATE DATABASE IF NOT EXISTS stuDB;二、删除数据库DROP DATABASE stuDB;DROP DATABASE IF EXISTS stuDB;2表的管理一、创建表# 语法:CREATE TABLE 【IF NOT EXISTS】表名( 字

2021-03-17 16:07:09 187

原创 SQL——DML语句

DML(Data Manipulation Language)一、数据的插入语法:单行插入:INSERT INTO 表名(字段名1,字段名2,...)values(值1,值2,...)多行插入:INSERT INTO 表名(字段名1,字段名2,...) values(值1,值2,...),values(值1,值2,...);特点:字段和值列表一一对应:包含类型、约束必须匹配 数值型的值,不用单引号;非数值型的值,必须使用单引号 字段顺序无要求#...

2021-03-17 16:06:39 182

原创 SQL——事务

概念:由一条或多条SQL语句组成,要么都成功,要么都失败分类:隐式事务:没有明显的开启和结束标记 比如dml语句的insert、update、delete语句本身就是一条事务 insert into stuinfo values (1, 'john', '男', 'ert@qq.com', 12)显式事务:具有明显的开启和结束标记 一般由多条SQL语句组成,必须具有明显的开启和...

2021-03-17 16:06:03 100

原创 数据分析

数据查询分析1.1数据的建立# coding:utf-8 # 编码申请import pandas as pd # 导入pandas工具包,pd可以理解为给工具包起的别名from pandas import DataFrame # 表示pandas中要导入的类data = {'ID':['000001','000002','000003','000004','000005','000006','

2021-03-01 19:53:57 688

原创 SQL学习笔记——DQL语言的学习

# 进阶一:基础查询/*语法:SELECT 查询列表 FROM 表名;特点:1、查询的结果集 是一个虚拟表 2、SELECT 类似于System.out.println(打印内容);SELECT 后面跟的查询列表,可以有多个部分组成,中间用逗号隔开例如:SELECT 字段1, 字段2, 表达式 FROM 表System.out.println()的打印内容,只能有一个3、执行顺序SELECT fiest_name FROM employees222;① FROM 子句② .

2021-02-03 18:02:09 197

原创 SQLZOO——Self join(难难难)

1.How manystopsare in the database.SELECT COUNT(id)FROM stops-- 直接计数即可2.Find theidvalue for the stop 'Craiglockhart'.SELECT idFROM stopsWHERE name = 'Craiglockhart'

2021-01-20 10:35:59 231 1

原创 SQLZOO——JOIN Quiz 2

1.Select the statement which lists the unfortunate directors of the movies which have caused financial loses (gross < budget)2.Select the correct example of JOINing three tablesmovie表和actor表联结有两种方式联结,见本页第6题3.Select the statement that shows...

2021-01-20 08:09:58 401 1

原创 SQLZOO——More JOIN operation

1.List the films where theyris 1962 [Showid,title]SELECT id, titleFROM movieWHERE yr=19622.Give year of 'Citizen Kane'.SELECT yrFROM movieWHERE title = 'Citizen Kane'3.List all of the Star Trek movies, include theid,titleandyr(all o...

2021-01-18 09:10:27 198

原创 SQLZOO——JOIN Quiz

目录(选择对应题目直接跳转即可)1.You want to find the stadium where player 'Dimitris Salpingidis' scored. Select the JOIN condition to use:2.You JOIN the tablesgoalandeteamin an SQL statement. Indicate the list of column names that may be used in the SELECT l...

2021-01-17 09:24:02 870

原创 SQLZOO——The JOIN operation

目录1.Modify it to show thematchidandplayername for all goals scored by Germany. To identify German players, check for:teamid = 'GER'2.Show id, stadium, team1, team2 for just game 10123.The code below shows the player (from the goal) and stadium n...

2021-01-16 11:24:48 264

原创 SQLZOO——Using Null

1.List the teachers who have NULL for their departmentSELECT nameFROM teacherWHERE dept IS NULL2.Note the INNER JOIN misses the teachers with no department and the departments with no teacher.SELECT teacher.name, dept.name FROM teacher INNER JOIN de

2021-01-15 10:54:26 156

原创 SQLZOO ——The nobel table can be used to practice more SUM and COUNT functions

1.Show the total number of prizes awarded.SELECT COUNT(winner) FROM nobel2.List each subject - just onceSELECT subjectFROM nobelGROUP BY subject3.Show the total number of prizes awarded for Physics.SELECT COUNT(subject)FROM nobelWHERE subject =

2021-01-14 13:22:02 268

原创 SQLZOO ——SUM and COUNT

SUM and COUNTWorld Country Profile: Aggregate functionsYou might want to look at these examples firstTotal world populationList of continentsGDP of Africa 6Count the big countriesBaltic states populationUsing GROUP BY and HAVINGCounting the count

2021-01-14 10:48:52 180 2

B站最优化理论与方法学习笔记

崔雪婷老师最优化理论与方法课程学习笔记。 主要讲解最优化问题的基础知识和算法。 包括凸集定义及基本性质、凸函数、凸优化问题、无约束优化、约束优化理论等。 适合最优化入门的学习爱好者。

2021-01-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除