随笔分类 - 4.2--MySQL
摘要:row_number,rank,dense_rank,percent_rank
阅读全文
摘要:val df6 = spark.sql("select gender,children,max(age),avg(age),count(age) from Affairs group by Cube(gender,children) order by 1,2") df6.show +------+--------+--------+--------+----------+ ...
阅读全文
摘要:mean均值,variance方差,stddev标准差,corr(Pearson相关系数),skewness偏度,kurtosis峰度
阅读全文
摘要:collect_set去除重复元素;collect_list不去除重复元素select gender, concat_ws(',', collect_set(children)), concat_ws(',', collect_list(children)) from Affairs group b
阅读全文
摘要:mysql> select TBL_ID,CREATE_TIME,LAST_ACCESS_TIME,TBL_NAME,TBL_TYPE from TBLS; +--------+-------------+------------------+----------------------+---------------+ | TBL_ID | CREATE_TIME | LAST_ACCESS_...
阅读全文
posted @ 2015-07-20 23:52
智能先行者
摘要:mysql> select concat('Hadoop:','Hive:','Spark#','HBase;',TBL_TYPE,'{}',SD_ID) from TBLS; | Hadoop:Hive:Spark#HBase;MANAGED_TABLE{}6 | | Hadoop:Hive:Sp
阅读全文
摘要:当前session可以直接用prompt修改 mysql> prompt \u@\h \d \r:\m:\s>PROMPT set to '\u@\h \d \r:\m:\s>'root@localhost mysql 02:06:38> 还可以在my.cnf配置文件中[mysql]添加(注意不是[
阅读全文
posted @ 2015-07-18 14:11
智能先行者
摘要:设置root密码 “mariabd”是新密码 [root@master /]# mysqladmin -u root password mariadb [root@master /]# mysql -u root -p Enter password: Welcome to the MariaDB m
阅读全文
posted @ 2015-07-12 20:11
智能先行者
摘要:1.Xtradb和InnoDB是一个很好的通用事物存储引擎。通常不确定选用何种存储引擎时,Xtradb和InnoDB是最佳的选择。2.MyISAM和Aria,占用空间小,系统之间容易复制。MyISAM是MySQL最悠久的存储引擎,而Aria是MariaDB更好的改良。3.TokuDB是一个优化不适合
阅读全文
posted @ 2015-07-12 20:10
智能先行者
摘要:SELECT E.DEPARTMENT_ID DID, E.JOB_ID JOB, E.MANAGER_ID MID, SUM(E.SALARY) SUM_SAL, COUNT(E.EMPLOYEE_ID) CNT, GROUP_ID() GG FROM EMPLOYEES E WHERE E.JOB_ID IN ('S...
阅读全文

浙公网安备 33010602011771号