怎么样查看给一个用户发了多少邮件? [原创]_Hadoop,ERP及大数据讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Hadoop,ERP及大数据讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3868 | 回复: 0   主题: 怎么样查看给一个用户发了多少邮件? [原创]        下一篇 
匿名用户
发表于: IP:您无权察看 2011-8-18 14:15:28 | [全部帖] [楼主帖] 楼主

原文:

How to See How Many Emails Were Sent To A User?
Applies to:
Oracle Agile Product Collaboration - Version: 9.2.2.1 and later [Release: 9.2.0.0 and later ]
Information in this document applies to any platform.
Goal
Is there a query (sql) that will give a count of how many email notifications where sent over the past 2 weeks to a user?
Solution
select count(*) from notification_user where notiuser_user_fk in (select id from agileuser where loginid='UserLogin') and notiuser_date_created > (sysdate - (16));
Note: Change the loginid='UserLogin' to the users username and this will give you the current systems date (todays date) back to16 days ago (two weeks), if you would like to know more days change the 16 to a higher number e.g. one month would be 30
Note: If the user has deleted notifications these will not be counted


译文:

怎么样查看给一个用户发了多少邮件?

版本:9.2.2.1或者更高版本[9.2.0.0或者更新版本]

目标:

有没有一个查询的SQL语句,能够查出在过去两周内给一个用户一共发了多少条邮件通知?

解决方案:

select count(*) from notification_user where notiuser_user_fk in (select id from agileuser where loginid='UserLogin') and notiuser_date_created > (sysdate - (16));


注意:修改loginid=’UserLogin’中的userLogin为具体的用户名,这个SQL语句,将为你查询从当前系统时间开始到过去16天(两周)内发送邮件的数量,如果你想要查询的天数大于16天,那么直接修改16就能做做,比如要查询30天以前的邮件数量,可以修改把16改为30。

注意:用户已经删除的邮件通知不会被记录在这个查询中。



赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论