wangqianwei 最近的时间轴更新
wangqianwei

wangqianwei

V2EX 第 465637 号会员,加入于 2020-01-17 16:57:03 +08:00
wangqianwei 最近回复了
2020-03-04 21:14:28 +08:00
回复了 yazoox 创建的主题 NGINX 真小白,请教一个 nginx 入门的配置问题,有关反向代理的
2020-03-04 21:13:04 +08:00
回复了 yazoox 创建的主题 NGINX 真小白,请教一个 nginx 入门的配置问题,有关反向代理的
源码地址有文档那么复杂,在默认的配置文件加一个 location 就好

下面的是他的示例:

Example config for Nginx:

location /jackett {
proxy_pass http://127.0.0.1:9117;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_redirect off;
}
2020-02-13 01:02:21 +08:00
回复了 ahmcsxcc 创建的主题 Docker dockerfile 编写求助
1、temp 目录不存在
2、./taskqueue >/temp/q.log & 不要加&
2020-02-12 16:22:25 +08:00
回复了 mmdsun 创建的主题 MySQL 请问这个 SQL 怎么写
CREATE TABLE `DEMO`(
`b_id` INT NOT NULL COMMENT '业务员 ID',
`c_id` INT NOT NULL COMMENT '客户 ID',
`sale` INT NOT NULL COMMENT '价格'
);

INSERT INTO `DEMO` (`b_id`, `c_id`, `sale`)
VALUES (1, 2, 1),
(1, 2, 1),
(1, 3, 1),
(1, 3, 1),
(1, 4, 1),
(1, 4, 1),
(1, 5, 1),
(1, 5, 1),
(1, 6, 1),
(2, 1, 3),
(2, 1, 1),
(2, 2, 3),
(2, 2, 1),
(2, 4, 3),
(2, 5, 1),
(2, 6, 3),
(2, 6, 1),
(3, 1, 3),
(3, 1, 1),
(3, 2, 3),
(3, 2, 1),
(3, 4, 3),
(3, 5, 1),
(3, 6, 3),
(3, 6, 1);

SELECT * FROM `DEMO`;

+------+------+------+
| b_id | c_id | sale |
+------+------+------+
| 1 | 2 | 1 |
| 1 | 2 | 1 |
| 1 | 3 | 1 |
| 1 | 3 | 1 |
| 1 | 4 | 1 |
| 1 | 4 | 1 |
| 1 | 5 | 1 |
| 1 | 5 | 1 |
| 1 | 6 | 1 |
| 2 | 1 | 3 |
| 2 | 1 | 1 |
| 2 | 2 | 3 |
| 2 | 2 | 1 |
| 2 | 4 | 3 |
| 2 | 5 | 1 |
| 2 | 6 | 3 |
| 2 | 6 | 1 |
| 3 | 1 | 3 |
| 3 | 1 | 1 |
| 3 | 2 | 3 |
| 3 | 2 | 1 |
| 3 | 4 | 3 |
| 3 | 5 | 1 |
| 3 | 6 | 3 |
| 3 | 6 | 1 |
+------+------+------+

SELECT `b_id`, `c_id`, `sales`
FROM (SELECT `b_id`, `c_id`, `sales`, RANK() OVER(PARTITION BY `b_id` ORDER BY `sales` DESC) as level
FROM (SELECT `b_id`, `c_id`, SUM(`sale`) AS `sales` FROM DEMO GROUP BY `b_id`, `c_id`) SUM_DEMO
order by `b_id`) LEVEL_DEMO
WHERE level <= 10;

+------+------+-------+
| b_id | c_id | sales |
+------+------+-------+
| 1 | 2 | 2 |
| 1 | 3 | 2 |
| 1 | 4 | 2 |
| 1 | 5 | 2 |
| 1 | 6 | 1 |
| 2 | 1 | 4 |
| 2 | 2 | 4 |
| 2 | 6 | 4 |
| 2 | 4 | 3 |
| 2 | 5 | 1 |
| 3 | 1 | 4 |
| 3 | 2 | 4 |
| 3 | 6 | 4 |
| 3 | 4 | 3 |
| 3 | 5 | 1 |
+------+------+-------+
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1012 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 19:39 · PVG 03:39 · LAX 11:39 · JFK 14:39
Developed with CodeLauncher
♥ Do have faith in what you're doing.