SQL: 文章浏览 (1-2) SQL: 文章浏览 (1-2)
发布时间
阅读量:
阅读量
数据
Views 表:
+---------------+---------+
|Column Name|Type|
+---------------+---------+
|article_id|int|
|---|---|
|viewer_id|int|
|view_date|date|
+---------------+---------+
该表格未设置主键字段,因而可能导致出现重复记录的情况。
表格中的每一项数据均用于描述特定个体在某一日访问了某位作者的特定文章。
需要特别指出的是,对于同一用户而言,其 author_id 与 viewer_id 的数值是完全一致的。
1. 文章浏览 1
Create table If Not Exists Views (article_id int, author_id int, viewer_id int, view_date date);
Truncate table Views;
insert into Views (article_i
全部评论 (0)
还没有任何评论哟~
