摘要: 监控库中存储和函数变更记录存储 1、建表 create table etl_log select now() etl_time, routine_type object_type, specific_name object_name, routine_schema schema_name, coun 阅读全文
posted @ 2022-12-05 09:53 左叔 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 查看用户在某天刷题后第二天还会再来刷题的平均概率 1、数据准备 CREATE TABLE `question_practice_detail` ( `id` int NOT NULL, `device_id` int NOT NULL, `question_id`int NOT NULL, `res 阅读全文
posted @ 2022-08-19 10:13 左叔 阅读(110) 评论(0) 推荐(0) 编辑
摘要: mysql计算正态分布、差异系数、离均差、离均差率 1、数据准备 建表 drop table if exists score; create table score( id int not null primary key auto_increment, score decimal(10,2) no 阅读全文
posted @ 2022-08-10 16:02 左叔 阅读(1105) 评论(0) 推荐(0) 编辑
摘要: mysql游标的使用 1、数据准备 建表 # 建表 drop table if exists store; CREATE TABLE IF NOT EXISTS `store` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) NO 阅读全文
posted @ 2022-08-09 10:02 左叔 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Oracle包的用法 1、语法格式 创建包头 CREATE [OR REPLACE] PACKAGE 包名 IS|AS 变量、常量及数据类型定义; 游标定义头部; 函数、过程的定义和参数列表以及返回类型; END [包名]; 创建包体 CREATE [OR REPLACE] PACKAGE BODY 阅读全文
posted @ 2022-08-09 09:17 左叔 阅读(539) 评论(0) 推荐(0) 编辑
摘要: mysql中位数计算方式 1、建表 drop table test_cunchu.score; create table test_cunchu.score( id int not null primary key auto_increment, score decimal(10,2) not nu 阅读全文
posted @ 2022-08-05 16:26 左叔 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: 获取随机中文名函数 函数如下: 1 create function rand_name() returns varchar(128) 2 begin 3 # 随机生成姓名函数 4 # 初始化十六姓氏的字符串,作为姓氏库 5 declare family_str varchar(128) defaul 阅读全文
posted @ 2022-08-04 16:11 左叔 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 获取随机字符串函数 函数如下: drop function if exists rand_string; create function rand_string(num int) returns varchar(255) no sql begin -- 随机字符串函数 # 定义字符串默认值(26个小 阅读全文
posted @ 2022-08-04 11:40 左叔 阅读(49) 评论(0) 推荐(0) 编辑
摘要: CDH环境搭建 一:准备三台虚拟机hadoop101,hadoop102,hadoop102 1、默认没有vim编辑器,可以执行命令进行安装(出现提示,输入y即可) vim install vim 2、ip映射,打开hosts文件,新增三条与主机的映射关系(三台主机都要修改) vim /etc/ho 阅读全文
posted @ 2022-07-26 15:57 左叔 阅读(534) 评论(0) 推荐(0) 编辑
摘要: hive中文注释乱码解决方法 注意:如果hive-site.xml文件里面默认配置的是UTF-8格式,可以省略一二步 第一步:进入hive安装目录下面的conf目录,修改hive-site.xml文件 cd /opt/module/hive/conf vim hive-site.xml 第二步:修改 阅读全文
posted @ 2022-04-29 11:52 左叔 阅读(1070) 评论(0) 推荐(0) 编辑