用户操作event表结构
字段名 |
数据类型 |
空 |
默认值约束、额外 |
注释 |
id |
int |
|
identity(1,1) |
无意义ID |
uid |
int |
|
|
用户编号 |
memo |
nvarchar(250) |
Y |
|
事件描述 |
create_time |
datetime |
|
|
事件时间 |
83469 | 2011-10-31 19:14 |
83469 | 2011-10-31 19:18 |
92322 | 2011-11-1 11:25 |
92324 | 2011-11-1 11:50 |
92324 | 2011-11-1 11:59 |
92324 | 2011-11-1 12:01 |
92327 | 2011-11-1 12:22 |
92327 | 2011-11-1 12:30 |
92327 | 2011-11-1 12:32 |
83469 | 2011-11-1 14:51 |
83469 | 2011-11-1 15:15 |
83469 | 2011-11-1 15:16 |
83469 | 2011-11-1 15:20 |
83469 | 2011-11-1 15:43 |
83469 | 2011-11-1 15:45 |
92334 | 2011-11-1 17:25 |
92334 | 2011-11-1 17:33 |
92334 | 2011-11-1 17:38 |
92334 | 2011-11-1 17:47 |
83469 | 2011-11-1 17:56 |
83469 | 2011-11-1 17:59 |
SELECT uid ,create_time
FROM event
GROUP BY uid,create_time
HAVING DATEDIFF(day, Max(create_time), GETDATE())>7
不吝赐教!
倚天杖
相关分类