SELECT A.name AS '애플리케이션',
B.name AS '버전명',
(SELECT TOP 1 CONVERT(VARCHAR(20), artifact.uploadDate, 20)
FROM artifact
WHERE artifact.projectVersion_id = B.project_id
ORDER BY uploadDate DESC) AS '날짜',
C.friority AS '위험도',
C.kingdom AS '취약점 대분류',
C.issueType AS '취약점 중분류',
C.issueSubtype AS '취약 점 소분류',
C.fileName AS '취약점 경로',
C.packageName AS '취약점 패키지',
C.className AS '취약점 클래스',
C.functionName AS '취약점 메소드',
C.lineNumber AS '취약점 라인'
FROM project AS A
INNER JOIN projectversion AS B
ON A.id = B.project_id
INNER JOIN issue AS C
ON B.id = C.projectVersion_id
WHERE C.hidden = 'N'
AND C.suppressed = 'N'
AND C.scanStatus <> 'REMOVED'
AND C.friority <> 'Medium'
AND C.friority <> 'Low'
GROUP BY A.name,
B.name,
C.friority,
C.kingdom,
C.issueType,
C.issueSubtype,
C.fileName,
C.lineNumber,
C.packageName,
C.className,
C.functionName,
B.project_id;