摘要: 留存分析——左连接 矩阵分析——group by 结构分析:分析每种产品占据总销售量的比例 排序分析 阅读全文
posted @ 2017-07-17 21:35 coskaka 阅读(211) 评论(0) 推荐(0) 编辑
摘要: http://www.cda.cn/view/21469.html tb_lemon_grade中,表中字段id,student_name,course,score分别表示成绩id,学生姓名,课程名称,课程成绩,表中数据表1所示。请写出一条SQL,将表1的数据变成表2的形式id 学生姓名 课程名称 阅读全文
posted @ 2017-07-17 12:16 coskaka 阅读(1844) 评论(0) 推荐(0) 编辑
摘要: 学习笔记,原文来自http://blog.csdn.net/robinjwong/article/details/24845125 创建分组 - GROUP BY 分组是在SELECT语句的GROUP BY子句中建立的。它的作用是通过一定的规则将一个数据集划分成若干个小的区域,然后针对若干个小区域进 阅读全文
posted @ 2017-07-17 11:10 coskaka 阅读(1824) 评论(0) 推荐(0) 编辑
摘要: W3Schools SQL Quiz 1. What does SQL stand for? You answered: Correct Answer! 2. Which SQL statement is used to extract data from a database? You answe 阅读全文
posted @ 2017-07-17 10:44 coskaka 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 181. Employees Earning More Than Their Managers https://leetcode.com/problems/employees-earning-more-than-their-managers/#/description The Employee ta 阅读全文
posted @ 2017-07-17 09:43 coskaka 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-07-16 23:19 coskaka 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目说明及要求: 以下是模似数据库里的表单信息,请根据要求写出SQL语句 表1:职工信息 表结构如下: 表名:Employee 职工ID 职工姓名 入职年份 部门ID A1 B1 2000 C1 A2 B2 1998 C2 A3 B3 1999 C1 A4 B4 2001 C4 表2:部门信息 表结 阅读全文
posted @ 2017-07-13 15:51 coskaka 阅读(891) 评论(0) 推荐(0) 编辑
摘要: 196. Delete Duplicate Emails Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its  阅读全文
posted @ 2017-07-08 17:43 coskaka 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 181. Employees Earning More Than Their Managers The Employee table holds all employees including their managers. Every employee has an Id, and there i 阅读全文
posted @ 2017-07-08 17:41 coskaka 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 《SQL学习指南》第9章 子查询 参考:leetcode 2 —————————————————————— 9.1 啥是子查询 9.2 子查询的类型 基于结果集的类型:单行/单列,单行/多列,多行/多列 完全独立的(非关联子查询)、引用包含语句中的列(关联查询) 9.3 非关联子查询 前面讲的都是非 阅读全文
posted @ 2017-07-05 10:19 coskaka 阅读(106) 评论(0) 推荐(0) 编辑