当时间以分钟为单位存储时,获取以小时为单位的总时间?

发布于 2024-12-10 00:46:19 字数 222 浏览 1 评论 0原文

在数据库中,我们有一个数字字段,表示医生评估患者记录的总时间(以分钟为单位)。而且,我们有一份报告,按医生姓名分组,并在一列中显示记录总数,在下一列中显示医生在给定时间范围内评估所有记录所花费的总分钟数以及总平均值医生在该时间范围内评估其记录所花费的分钟数。

但是,我们有一位客户希望在几小时内而不是几分钟内看到这些数字。有没有办法让我在查询中进行除法,或者我是否必须在几分钟内得到结果,然后为每个医生除以 60?

In the database, we have a numeric field that represents the total time in minutes for a doctor to evaluate a patient record. And, we have a report that groups by the doctor name and shows the total number of records in one column, the total number of minutes the doctor took to evaluate all of their records in a given time frame in the next column and the total average number of minutes it took for the doctor to evaluate their records during that time frame.

But, we have one customer who wants to see these numbers in hours, not minutes. Is there a way for me to do the division in the query or am I going to have to get the results in minutes and then divide by 60 for each doctor?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

错爱 2024-12-17 00:46:19

像这样的东西:

SELECT doctor_id, SUM(minutes_spent) / 60 AS hours_spent
FROM that_table
GROUP BY doctor_id

Something like:

SELECT doctor_id, SUM(minutes_spent) / 60 AS hours_spent
FROM that_table
GROUP BY doctor_id
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文