摘要: 1097. 游戏玩法分析 V SQL架构 Activity 活动记录表 + + + | Column Name | Type | + + + | player_id | int | | device_id | int | | event_date | date | | games_played | 阅读全文
posted @ 2020-04-27 10:26 漫漫长路远 阅读(187) 评论(0) 推荐(0)
摘要: Employee 表保存了一年内的薪水信息。 请你编写 SQL 语句,来查询一个员工三个月内的累计薪水,但是不包括最近一个月的薪水。 结果请按 'Id' 升序,然后按 'Month' 降序显示。 示例:输入: | Id | Month | Salary || | | || 1 | 1 | 20 || 阅读全文
posted @ 2020-04-26 16:28 漫漫长路远 阅读(215) 评论(0) 推荐(0)
摘要: 1、题目描述 来源:力扣(LeetCode) select * from (select company,salary , @c := @c+1 as r from employee , (select @c :=0) c order by company , salary) a join (sel 阅读全文
posted @ 2020-04-26 15:34 漫漫长路远 阅读(231) 评论(0) 推荐(0)
摘要: 来源:力扣(LeetCode) select number as median from ( select number , @r:=@r+1 as st,@r:=@r+frequency-1 as ed ,b.cnt ,if( cnt mod 2 = 0 , cnt div 2, (cnt div 阅读全文
posted @ 2020-04-26 15:29 漫漫长路远 阅读(159) 评论(0) 推荐(0)
摘要: 目的,检查mysql主主模式,mysqlbinlog的工作模式 下面按步骤开始,masterA、masterB 1、在masterA上建立数据 查看masterA上的数据 再查看masterB上的数据 数据同步已完成; 在masterB上执行SQL,继续插入数据 masterB上查询 masterA 阅读全文
posted @ 2019-10-22 16:33 漫漫长路远 阅读(452) 评论(0) 推荐(0)
摘要: 参照官方文档https://dev.mysql.com/doc/refman/8.0/en/binary-installation.html 1、解压安装包 mysql-8.0.17-linux-glibc2.12-x86_64.tar.xz [root@localhost opt]# tar Jx 阅读全文
posted @ 2019-10-22 16:31 漫漫长路远 阅读(796) 评论(0) 推荐(0)
摘要: 尝试从mysqlbinlog中找到被删除的数据,并重新生成insert脚本 首先,通过mysqlbinlog命令,还原mysql-bin日志为可视化sql 分析还原后的sql,确认DELETE的代码结构 书写java类,解析日志结构,还原为insert语句 阅读全文
posted @ 2019-10-22 16:30 漫漫长路远 阅读(337) 评论(0) 推荐(0)
摘要: 三、binlog备份方案 阅读全文
posted @ 2019-10-22 16:26 漫漫长路远 阅读(166) 评论(0) 推荐(0)