先看一下我的表内容和数据,再做接下来的例子和讲解1.分组函数的基本用法
select 字段列表 from 表名 [WHERE 条件] group by 分组字段名 [HAVING 分组后的过滤条件]
2.先声明where和having的区别
1.执行时机不同:where是分组之前进行过滤,…
简述:
排序函数:Order by;升序 ASC;降序 DESC;
答案:
Select distinct author_id as id from Views where author_id viewer_id order by id Asc;