blob: 83f922d0d96650ec1b281f375a669ae07c963c55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<?xml version="1.0" encoding="utf-8" ?>
<sqlMap>
<select id="GetTimeReportByProjectID" resultClass="UserReport">
SELECT
categories.CategoryID as CategoryID,
time_entry.UserID as Username,
SUM(time_entry.Duration) as ActualDuration
FROM
time_entry, categories
WHERE
categories.CategoryID = time_entry.CategoryID
AND categories.ProjectID = #value#
GROUP BY
categories.ProjectID
ORDER BY
categories.ProjectID
</select>
<select id="GetTimeReportByCategoryID" resultClass="UserReport">
SELECT
categories.CategoryID as CategoryID,
time_entry.UserID as Username,
SUM(time_entry.Duration) as ActualDuration
FROM
time_entry, categories
WHERE
categories.CategoryID = time_entry.CategoryID
AND categories.CategoryID = #value#
GROUP BY
time_entry.UserID
ORDER BY
categories.CategoryID
</select>
<select id="GetTimeReportByUsername" resultClass="float">
SELECT
SUM(Duration) as TotalDuration
FROM
time_entry
WHERE
UserID = #value#
</select>
</sqlMap>
|