MySQL——查询(2)

这篇文章是接着上一篇文章MySQL——查询(1)的续篇,用于查询的数据表在第一篇文章中已经给出了,如果不知道请看一下第一篇文章。

接着讨论mysql的基本查询语句

-- 聚集函数的用法,一般都结合GROUP BY 使用但也可以不和GROUP BY一起使用

-- COUNT(*) 统计一列中元组的个数,也就是记录的条数
-- SUM() 计算一列中值得总和
-- AVG() 计算一列中的平均数
-- MAX() 计算一列值中的最大值
-- MIN() 求列值中的最小值
-- 这是标准SQL中支持的函数,下面介绍一些mysql支持的函数

-- GROUP_CONCAT() 得到分组详情,如下列子
-- 查询id,sex,用户名详情按照性别分组

SELECT id,sex,GROUP_CONCAT(username) FROM cms_user GROUP BY sex;
+----+--------+---------------------------------+
| id | sex    | GROUP_CONCAT(username)          |
+----+--------+---------------------------------+
|  1 | 男     | 张三,rose,king,ring,章子怡      |
|  4 | 女     | long,queen,blek,张三丰,lily     |
| 11 | 保密   | john,test1                      |
+----+--------+---------------------------------+

-- 我们怎么理解这个函数的功能呢?可以先看一下这个查询

SELECT username FROM cms_user;
+-----------+
| username  |
+-----------+
| blek      |
| john      |
| king      |
| lily      |
| long      |
| queen     |
| ring      |
| rose      |
| test1     |
| 张三      |
| 张三丰    |
| 章子怡    |
+-----------+

-- 然后再使用group_concat函数

SELECT GROUP_CONCAT(username) FROM cms_user;
+---------------------------------------------------------------------------+
| GROUP_CONCAT(username)                                                    |
+---------------------------------------------------------------------------+
| blek,john,king,lily,long,queen,ring,rose,test1,张三,张三丰,章子怡         |
+---------------------------------------------------------------------------+

-- 这样就把username的内容输出结果集合在一起,然后再用group by语句。

SELECT GROUP_CONCAT(username) FROM cms_user group by sex;
+---------------------------------+
| GROUP_CONCAT(username)          |
+---------------------------------+
| 张三,rose,king,ring,章子怡      |
| long,queen,blek,张三丰,lily     |
| john,test1                      |
+---------------------------------+
SELECT id,GROUP_CONCAT(username) FROM cms_user where id >= 5 group by sex;
+----+------------------------+
| id | GROUP_CONCAT(username) |
+----+------------------------+
|  5 | ring,king,rose         |
|  6 | queen,blek,lily        |
| 11 | john,test1             |
+----+------------------------+

-- 我们可以这样理解,先根据sex分成不同的组,每个组里面都有很多记录,然后用group_concat函数把这些每个组里面的username连接起来
-- 这里还要注意的是group_concat函数 不会去重

SELECT proId,GROUP_CONCAT(sex) FROM cms_user GROUP BY proId;
+-------+------------------------+
| proId | GROUP_CONCAT(sex)      |
+-------+------------------------+
|     1 | 男,女,保密             |
|     2 | 男,女,男,女,保密       |
|     3 | 女,男                  |
|     4 | 女                     |
|     5 | 男                     |
+-------+------------------------+

-- 更新一下cms_user 表中的年龄

UPDATE cms_user SET age=11 WHERE id=1;
UPDATE cms_user SET age=21 WHERE id=2;
UPDATE cms_user SET age=33 WHERE id=3;
UPDATE cms_user SET age=44 WHERE id=4;
UPDATE cms_user SET age=25 WHERE id=5;
UPDATE cms_user SET age=77 WHERE id=6;
UPDATE cms_user SET age=56 WHERE id=7;
UPDATE cms_user SET age=88 WHERE id=8;
UPDATE cms_user SET age=12 WHERE id=9;
UPDATE cms_user SET age=32 WHERE id=10;
UPDATE cms_user SET age=65 WHERE id=11;

--查询编号,sex,用户名详情以及组中总人数按照sex分组

SELECT id,sex,GROUP_CONCAT(username)AS users,COUNT(*) AS totalUsers FROM cms_user GROUP BY sex;
----+--------+---------------------------------+------------+
| id | sex    | users                           | totalUsers |
+----+--------+---------------------------------+------------+
|  1 | 男     | 张三,rose,king,ring,章子怡      |          5 |
|  4 | 女     | long,queen,blek,张三丰,lily     |          5 |
| 11 | 保密   | john,test1                      |          2 |
+----+--------+---------------------------------+------------+
select id,username from cms_user where id>=5;
+----+----------+
| id | username |
+----+----------+
|  5 | ring     |
|  6 | queen    |
|  7 | king     |
|  8 | blek     |
|  9 | rose     |
| 10 | lily     |
| 11 | john     |
| 12 | test1    |
+----+----------+

-- 接着查询id号>=5的用户有多少个

select count(*) from cms_user where id>=5;
+----------+
| count(*) |
+----------+
|        8 |
+----------+
select count(username) from cms_user where id>=5;
+-----------------+
| count(username) |
+-----------------+
|               8 |
+-----------------+

-- 也可以重命名,在count后面的参数可以是具体的字段,也可以是*通配符

select count(username) totalUser from cms_user where id>=5;
+-----------+
| totalUser |
+-----------+
|         8 |
+-----------+

-- 注意:COUNT(字段)不统计NULL值

SELECT COUNT(age) AS totalUsers FROM cms_user;
+------------+
| totalUsers |
+------------+
|         11 |
+------------+

--查询编号,性别,用户名详情,组中总人数,组中最大年龄,最小年龄,
-- 平均年龄,以及年龄总和按照性别分组

SELECT id,sex,GROUP_CONCAT(username),
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
MIN(age) AS min_age,
AVG(age) AS avg_age,
SUM(age) AS sum_age
FROM cms_user
GROUP BY sex;
+----+--------+---------------------------------+------------+---------+---------+---------+---------+
| id | sex    | GROUP_CONCAT(username)          | totalUsers | max_age | min_age | avg_age | sum_age |
+----+--------+---------------------------------+------------+---------+---------+---------+---------+
|  1 | 男     | 张三,rose,king,ring,章子怡      |          5 |      56 |      11 | 27.4000 |     137 |
|  4 | 女     | long,queen,blek,张三丰,lily     |          5 |      88 |      21 | 52.4000 |     262 |
| 11 | 保密   | john,test1                      |          2 |      65 |      65 | 65.0000 |      65 |
+----+--------+---------------------------------+------------+---------+---------+---------+---------+

-- WITH ROLLUP用法详解,

-- 首先观察下面的这个查询出来的结果

SELECT id,sex,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
MIN(age) AS min_age
FROM cms_user
GROUP BY sex;
+----+--------+------------+---------+---------+
| id | sex    | totalUsers | max_age | min_age |
+----+--------+------------+---------+---------+
|  1 | 男     |          5 |      56 |      11 |
|  2 | 女     |          5 |      88 |      21 |
| 11 | 保密   |          2 |      65 |      65 |
+----+--------+------------+---------+---------+

-- 然后再看如下的查询与上面查询的区别在哪里

SELECT id,sex,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
MIN(age) AS min_age
FROM cms_user
GROUP BY sex WITH ROLLUP;
| id | sex    | totalUsers | max_age | min_age |
+----+--------+------------+---------+---------+
|  1 | 男     |          5 |      56 |      11 |
|  4 | 女     |          5 |      88 |      21 |
| 11 | 保密   |          2 |      65 |      65 |
| 11 | NULL   |         12 |      88 |      11 |
+----+--------+------------+---------+---------+

-- 这里我解释解释WITH ROLLUP的功能
-- 首先with rollup会在查询的结果的最后加上一条记录,看第一列为id,第一列上没有使用聚集函数所以就直接在最后填充的记录上变为原来记录的最后一条复制过去,这里就是11然后因为这里是以sex分组,所以赋值为NULL,在第三列中使用了count函数,在这里就是直接把输出在屏幕上的值5 5 2 使用count函数加起来赋值就为12,第四列就使用了max函数,这里就在输出的结果中使用max函数找出56 88 65 中的最大值88 赋值过去,最后一列使用了min函数,这里也使用min找出11 21 65 中的最小值赋值过去
-- 接下来再看这样的一个查询

SELECT id,sex,
COUNT(*) AS totalUsers, 
MAX(age) AS max_age,
MIN(age) AS min_age,
proid 
FROM cms_user 
GROUP BY proid WITH ROLLUP;
+----+------+------------+---------+---------+-------+
| id | sex  | totalUsers | max_age | min_age | proid |
+----+------+------------+---------+---------+-------+
|  1 | 男   |          3 |      88 |      11 |     1 |
|  5 | 男   |          5 |      65 |      12 |     2 |
|  6 | 女   |          2 |      77 |      33 |     3 |
|  4 | 女   |          1 |      44 |      44 |     4 |
|  7 | 男   |          1 |      56 |      56 |     5 |
|  7 | 男   |         12 |      88 |      11 |  NULL |
+----+------+------------+---------+---------+-------+

-- 再对照上一个查询比较一下这两个查询的不同和相同之处 体会一下with rollup

-- having字句用法
--查询性别sex,用户名详情,组中总人数,最大年龄,年龄总和,根据性别分组

SELECT sex,GROUP_CONCAT(username) AS users,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
SUM(age) AS sum_age
FROM cms_user 
GROUP BY sex;
+--------+---------------------------------+------------+---------+---------+
| sex    | users                           | totalUsers | max_age | sum_age |
+--------+---------------------------------+------------+---------+---------+
| 男     | 张三,rose,king,ring,章子怡      |          5 |      56 |     137 |
| 女     | long,queen,blek,张三丰,lily     |          5 |      88 |     262 |
| 保密   | john,test1                      |          2 |      65 |      65 |
+--------+---------------------------------+------------+---------+---------+

-- 查询组中总人数大于2的,对分组结果的二次筛选,having位置放在group by 之后

SELECT sex,GROUP_CONCAT(username) AS users,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
SUM(age) AS sum_age
FROM cms_user 
GROUP BY sex
HAVING COUNT(*)>2;
+------+---------------------------------+------------+---------+---------+
| sex  | users                           | totalUsers | max_age | sum_age |
+------+---------------------------------+------------+---------+---------+
| 男   | 张三,rose,king,ring,章子怡      |          5 |      56 |     137 |
| 女   | long,queen,blek,张三丰,lily     |          5 |      88 |     262 |
+------+---------------------------------+------------+---------+---------+

-- 查询组中人数大于2并且最大年龄大于60的

SELECT sex,GROUP_CONCAT(username) AS users,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
SUM(age) AS sum_age
FROM cms_user 
GROUP BY sex
HAVING COUNT(*)>2 AND MAX(age)>60;
+------+--------------------------------+------------+---------+---------+
| sex  | users                          | totalUsers | max_age | sum_age |
+------+--------------------------------+------------+---------+---------+
| 女   | long,queen,blek,张三丰,lily    |          5 |      88 |     262 |
+------+--------------------------------+------------+---------+---------+

-- 查询编号大于等于2的用户

SELECT sex,GROUP_CONCAT(username) AS users,
COUNT(*) AS totalUsers,
MAX(age) AS max_age,
SUM(age) AS sum_age
FROM cms_user 
WHERE id>=6
GROUP BY sex
HAVING COUNT(*)>2 AND MAX(age)>60;
+------+-----------------+------------+---------+---------+
| sex  | users           | totalUsers | max_age | sum_age |
+------+-----------------+------------+---------+---------+
| 女   | queen,blek,lily |          3 |      88 |     197 |
+------+-----------------+------------+---------+---------+

-- 接下来我们总结下where 和 having的区别,可以这样简单的理解,where的作用对象是表,而having作用对象是 已经查询出来的结果也就是说先查询出很多的记录再在查询出的结果上筛选
-- 具体看一看一下查询语句

select id iddd,username user from cms_user having iddd>3;
+------+-------+
| iddd | user  |
+------+-------+
|    8 | blek  |
|   11 | john  |
|    7 | king  |
|   10 | lily  |
|    4 | long  |
|    6 | queen |
|    5 | ring  |
|    9 | rose  |
|   12 | test1 |
+------+-------+
select id iddd,username user from cms_user where iddd>3;
+------+-------+
| iddd | user  |
+------+-------+
|    8 | blek  |
|   11 | john  |
|    7 | king  |
|   10 | lily  |
|    4 | long  |
|    6 | queen |
|    5 | ring  |
|    9 | rose  |
|   12 | test1 |
+------+-------+

-- 这两个查询都是可以的,因为用select id iddd,username user from cms_user 查询出来的结果都有id列

select id iddd,username user from cms_user having id>3;
+------+-------+
| iddd | user  |
+------+-------+
|    8 | blek  |
|   11 | john  |
|    7 | king  |
|   10 | lily  |
|    4 | long  |
|    6 | queen |
|    5 | ring  |
|    9 | rose  |
|   12 | test1 |
+------+-------+

-- 再继续查看如下的查询

select id iddd,username user from cms_user where proid>3;
+------+------+
| iddd | user |
+------+------+
|    4 | long |
|    7 | king |
+------+------+
select id iddd,username user from cms_user having proid>3;
ERROR 1054 (42S22): Unknown column 'proid' in 'having clause'

-- 不知道 having从句中的proid列 这是因为在select id iddd,username user from cms_user查询出来的结果中没有包含 proid 列,如果在前面添加上proid列也会查询成功

select id iddd,username user,proid from cms_user having proid>3;
+------+------+-------+
| iddd | user | proid |
+------+------+-------+
|    4 | long |     4 |
|    7 | king |     5 |
+------+------+-------+

-- 总结having和where不同就在于先后的关系,where比having先。
-- 还有一点区别就是where后面不能接聚集函数,但是having可以

select id iddd,username user,proid,count(*) from cms_user having count(*)>3;
+------+--------+-------+----------+
| iddd | user   | proid | count(*) |
+------+--------+-------+----------+
|    1 | 张三   |     1 |       12 |
+------+--------+-------+----------+

-- 如果where后面接聚集函数会直接报错

select id iddd,username user,proid,count(*) from cms_user where count(*)>3;
ERROR 1111 (HY000): Invalid use of group function

-- order by 排序语句

-- 按照id降序排列DESC 默认的是ASC

SELECT id,username,password FROM cms_user ORDER BY id ;
+----+-----------+--------------+
| id | username  | password     |
+----+-----------+--------------+
|  1 | 张三      | zhangsan     |
|  2 | 张三丰    | zhangsanfeng |
|  3 | 章子怡    | zhangsan     |
|  4 | long      | long         |
|  5 | ring      | ring         |
|  6 | queen     | queen        |
|  7 | king      | king         |
|  8 | blek      | blek         |
|  9 | rose      | rose         |
| 10 | lily      | lily         |
| 11 | john      | john         |
| 12 | test1     | test1        |
+----+-----------+--------------+
SELECT id,username,password FROM cms_user ORDER BY id DESC;
+----+-----------+--------------+
| id | username  | password     |
+----+-----------+--------------+
| 12 | test1     | test1        |
| 11 | john      | john         |
| 10 | lily      | lily         |
|  9 | rose      | rose         |
|  8 | blek      | blek         |
|  7 | king      | king         |
|  6 | queen     | queen        |
|  5 | ring      | ring         |
|  4 | long      | long         |
|  3 | 章子怡    | zhangsan     |
|  2 | 张三丰    | zhangsanfeng |
|  1 | 张三      | zhangsan     |
+----+-----------+--------------+

-- 按照年龄升序排列

SELECT username,age FROM cms_user ORDER BY age ASC;
+-----------+------+
| username  | age  |
+-----------+------+
| test1     | NULL |
| 张三      |   11 |
| rose      |   12 |
| 张三丰    |   21 |
| ring      |   25 |
| lily      |   32 |
| 章子怡    |   33 |
| long      |   44 |
| king      |   56 |
| john      |   65 |
| queen     |   77 |
| blek      |   88 |
+-----------+------+

-- 这里应该注意的是在order by 排序中也是和having一样是在查询出的结果集中进行排序可以查看下面的查询语句

SELECT age,id FROM cms_user ORDER BY 1;
+------+----+
| age  | id |
+------+----+
| NULL | 12 |
|   11 |  1 |
|   12 |  9 |
|   21 |  2 |
|   25 |  5 |
|   32 | 10 |
|   33 |  3 |
|   44 |  4 |
|   56 |  7 |
|   65 | 11 |
|   77 |  6 |
|   88 |  8 |
+------+----+
SELECT age,id FROM cms_user ORDER BY 2;
+------+----+
| age  | id |
+------+----+
|   11 |  1 |
|   21 |  2 |
|   33 |  3 |
|   44 |  4 |
|   25 |  5 |
|   77 |  6 |
|   56 |  7 |
|   88 |  8 |
|   12 |  9 |
|   32 | 10 |
|   65 | 11 |
| NULL | 12 |
+------+----+
SELECT age,id FROM cms_user ORDER BY id;
+------+----+
| age  | id |
+------+----+
|   11 |  1 |
|   21 |  2 |
|   33 |  3 |
|   44 |  4 |
|   25 |  5 |
|   77 |  6 |
|   56 |  7 |
|   88 |  8 |
|   12 |  9 |
|   32 | 10 |
|   65 | 11 |
| NULL | 12 |
+------+----+
SELECT age,id FROM cms_user ORDER BY 3;
ERROR 1054 (42S22): Unknown column '3' in 'order clause'

-- 但是我们不用数字指定列,直接用字段名称也行

SELECT age,id FROM cms_user ORDER BY proid;
+------+----+
| age  | id |
+------+----+
|   11 |  1 |
|   88 |  8 |
| NULL | 12 |
|   25 |  5 |
|   21 |  2 |
|   12 |  9 |
|   32 | 10 |
|   65 | 11 |
|   77 |  6 |
|   33 |  3 |
|   44 |  4 |
|   56 |  7 |
+------+----+

-- 所以我们用数字指定排序对象的时候应该特别注意

UPDATE cms_user SET age=12 WHERE id=5;

-- 按照年龄升序,id降序排列

SELECT age,id FROM cms_user ORDER BY age ASC,id DESC;
+------+----+
| age  | id |
+------+----+
| NULL | 12 |
|   11 |  1 |
|   12 |  9 |
|   12 |  5 |
|   21 |  2 |
|   32 | 10 |
|   33 |  3 |
|   44 |  4 |
|   56 |  7 |
|   65 | 11 |
|   77 |  6 |
|   88 |  8 |
+------+----+

-- 排序也可以按照先后顺序 如果出现相同的age则又根据id降序排列 也阔以按照三个或者以上的字段排序

-- 实现记录随机

SELECT * FROM cms_user ORDER BY RAND();
+----+-----------+--------------+-------------+------------+----------+-------+------+--------+
| id | username  | password     | email       | regTime    | face     | proId | age  | sex    |
+----+-----------+--------------+-------------+------------+----------+-------+------+--------+
|  6 | queen     | queen        | user@qq.com | 1419861708 | user.jpg |     3 |   77 | 女     |
| 12 | test1     | test1        | user@qq.com | 1419811708 | user.jpg |     1 | NULL | 保密   |
|  9 | rose      | rose         | user@qq.com | 1419821708 | user.jpg |     2 |   12 | 男     |
|  4 | long      | long         | user@qq.com | 1419814708 | user.jpg |     4 |   44 | 女     |
| 10 | lily      | lily         | user@qq.com | 1419831708 | user.jpg |     2 |   32 | 女     |
|  8 | blek      | blek         | user@qq.com | 1419818708 | user.jpg |     1 |   88 | 女     |
|  2 | 张三丰    | zhangsanfeng | user@qq.com | 1419812708 | user.jpg |     2 |   21 | 女     |
|  7 | king      | king         | user@qq.com | 1419817708 | user.jpg |     5 |   56 | 男     |
|  1 | 张三      | zhangsan     | user@qq.com | 1419811708 | user.jpg |     1 |   11 | 男     |
|  5 | ring      | ring         | user@qq.com | 1419815708 | user.jpg |     2 |   12 | 男     |
| 11 | john      | john         | user@qq.com | 1419841708 | user.jpg |     2 |   65 | 保密   |
|  3 | 章子怡    | zhangsan     | user@qq.com | 1419813708 | user.jpg |     3 |   33 | 男     |
+----+-----------+--------------+-------------+------------+----------+-------+------+--------+

-- 每次执行都是返回的不一样的查询结果

-- limit 关键字限制显示条数,格式: LIMIT [offset,] rows | rows OFFSET offset
-- 显示表中的所有记录

select id,username,password from cms_user;
+----+-----------+--------------+
| id | username  | password     |
+----+-----------+--------------+
|  1 | 张三      | zhangsan     |
|  2 | 张三丰    | zhangsanfeng |
|  3 | 章子怡    | zhangsan     |
|  4 | long      | long         |
|  5 | ring      | ring         |
|  6 | queen     | queen        |
|  7 | king      | king         |
|  8 | blek      | blek         |
|  9 | rose      | rose         |
| 10 | lily      | lily         |
| 11 | john      | john         |
| 12 | test1     | test1        |
+----+-----------+--------------+

-- 显示查询结果中的前3条记录

SELECT id,username,password FROM cms_user LIMIT 3;
+----+-----------+--------------+
| id | username  | password     |
+----+-----------+--------------+
|  1 | 张三      | zhangsan     |
|  2 | 张三丰    | zhangsanfeng |
|  3 | 章子怡    | zhangsan     |
+----+-----------+--------------+

-- 显示id号最大的五条记录

SELECT id,username,password FROM cms_user ORDER BY id DESC LIMIT 5;
+----+----------+----------+
| id | username | password |
+----+----------+----------+
| 12 | test1    | test1    |
| 11 | john     | john     |
| 10 | lily     | lily     |
|  9 | rose     | rose     |
|  8 | blek     | blek     |
+----+----------+----------+

-- 查询表中前一条记录
-- LIMIT 子句可以被用于强制 SELECT 语句返回指定的记录数。LIMIT 接受一个或两个数字参数。参数必须是一个整数常量。如果给定两个参数,第一个参数指定第一个返回记录行的偏移量(说得通俗易懂点就是从第几条记录开始计数),第二个参数指定返回记录行的最大数目(也就是返回从第一个参数标记的位置开始,向后返回记录的条数,具体的列子可以参考如下)。初始记录行的偏移量是 0(而不是 1): 为了与 PostgreSQL 兼容,MySQL 也支持句法: LIMIT # OFFSET #。

SELECT id,username,password FROM cms_user LIMIT 0,1;
+----+----------+----------+
| id | username | password |
+----+----------+----------+
|  1 | 张三     | zhangsan |
+----+----------+----------+

-- 查询从第二行

SELECT id,password,username FROM cms_user LIMIT 1,1;
+----+--------------+-----------+
| id | password     | username  |
+----+--------------+-----------+
|  2 | zhangsanfeng | 张三丰    |
+----+--------------+-----------+
 SELECT id,password,username FROM cms_user LIMIT 1,2;
+----+--------------+-----------+
| id | password     | username  |
+----+--------------+-----------+
|  2 | zhangsanfeng | 张三丰    |
|  3 | zhangsan     | 章子怡    |
+----+--------------+-----------+

-- OFFSET的用法就相当于把逗号换成OFFSET关键字,把这两个参数的位置交换一下

SELECT id,password,username FROM cms_user LIMIT 1 OFFSET 1;
+----+--------------+-----------+
| id | password     | username  |
+----+--------------+-----------+
|  2 | zhangsanfeng | 张三丰    |
+----+--------------+-----------+
SELECT id,password,username FROM cms_user LIMIT 2 OFFSET 1;
+----+--------------+-----------+
| id | password     | username  |
+----+--------------+-----------+
|  2 | zhangsanfeng | 张三丰    |
|  3 | zhangsan     | 章子怡    |
+----+--------------+-----------+
SELECT id,password,username FROM cms_user LIMIT 1 OFFSET 2;
+----+----------+-----------+
| id | password | username  |
+----+----------+-----------+
|  3 | zhangsan | 章子怡    |
+----+----------+-----------+

-- 最后我就是要总结下这么多的查询语句到底执行的顺序是什么样子的,结果看如下截图

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 202,607评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,047评论 2 379
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,496评论 0 335
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,405评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,400评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,479评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,883评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,535评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,743评论 1 295
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,544评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,612评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,309评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,881评论 3 306
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,891评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,136评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,783评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,316评论 2 342

推荐阅读更多精彩内容

  • 分组查询 group by group by 属性名 [having 条件表达式][ with rollup] “...
    GALAXY_ZMY阅读 216评论 0 2
  • MYSQL 基础知识 1 MySQL数据库概要 2 简单MySQL环境 3 数据的存储和获取 4 MySQL基本操...
    Kingtester阅读 7,764评论 5 116
  • 查询基础 算术运算符 (+)(-)(*)(/) 值得注意的是:/ 在oracle中就相当于显示中的除法 5/2 =...
    Autism_37a1阅读 471评论 0 0
  • 字符串相关
    henu_Larva阅读 207评论 0 1
  • 001,所谓的360行行行出状元,就是说的每个人都有自己擅长的部分,专业的事情让专业的人去,合理配置资源才能达到最...
    梅子的春天阅读 292评论 0 1