

也是有两种解法
sqlcreate table Person(
id int primary key,
email varchar(20)
) ;
show tables;


解法一:临时表
SQLcreate table weather(
id int primary key ,
recordData date ,
temperature int
);
show tables;
select * from weather;
insert into weather values (1,'2015-01-01',10),(2,'2015-01-02',25),(3,'2015-01-03',20),(4,'2015-01-04',30);
select a.id
from weather as a,weather as b
where a.temperature > b.temperature
and datediff(a.recordData,b.recordData) = 1;
解法二:自连接
sqlselect a.id
from weather as a join weather as b
on datediff(a.recordData,b.recordData) = 1
where a.temperature > b.temperature ;
When I’m lost in Chinese cities I stop a taxi and give them my destination written on a piece of paper (in Chinese characters, supplied by a friend or hotel staff). Taxis are relatively cheap in China.
中文翻译
当我在中国的城市迷路时,我会拦下一辆出租车,然后给司机看一张纸上写着我的目的地的纸条(用中文字符书写,由朋友或酒店工作人员提供)。在中国,出租车相对便宜。
我的博客运行在80端口,直接通过域名访问,但是我有其他的demo项目也需要运行在80端口,这样我们不用在丑陋的域名后面加上端口号了,怎么做呢,这时候需要用nginx做一个反向代理,nginx真正的运行在80端口,负责接收外来请求根据请求的域名来转发给不同的服务,我的服务时运行在8080和8081端口,nginx配置文件如下
events { worker_connections 1024; } http { server { listen 80; server_name www.wmyh.top; location / { proxy_pass http://localhost:8080; } } server { listen 80; server_name www.yowayimono.cn; location / { proxy_pass http://localhost:8081; } } }
很简单,我们把nginx运行在容器中,docker run --name nginx -p 80:80 -v /root/nginx/nginx.conf:/etc/nginx/nginx.conf -d nginx ,挂载配置文件。运行就可以了。你还可以配置更多的服务。