我正在嘗試生成一份報告,顯示我們每個季度的案件數量和存在的貨幣價值。 問題是我可以計算每個季度的案件數量,但貸款金額是一個掙扎。這裏 SELECT
COUNT(case when CONVERT(DATE,p.ProjectEndEstimate,103) BETWEEN GETDATE() AND DATEADD(Day , +91,GETDATE()) then 1 end) AS [1st
我需要等於同一個表中月份結束的數據。 什麼到目前爲止,我掙扎是: SELECT * FROM LG_006_01_EMFLINE H
where h.DATE_ in (
declare @start datetime
declare @end datetime
select @Start = (select MIN(mm.date_) as minimum FROM LG_006_
我有以下SQL SELECT COUNT(*) as Total, SentByText
FROM letterCase WITH (nolock)
WHERE (SenttoClientDate BETWEEN DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0) AND DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6))
group