SQL SELECT Query for a Total and parts building the total?

SELECT dbo.Job. BatchID, COUNT(dbo.Job. OID) AS Total, COUNT(CASE WHEN JobStatusID = 1 THEN 1 END) AS Ready to book, COUNT(CASE WHEN JobStatusID = 2 THEN 1 END) AS Pending, COUNT(CASE WHEN JobStatusID = 3 THEN 1 END) AS Booked, COUNT(CASE WHEN JobStatusID = 4 THEN 1 END) AS Cancelled, COUNT(CASE WHEN JobStatusID = 6 THEN 1 END) AS CallBack, dbo.JobBatch.

BatchDate FROM dbo. Job INNER JOIN dbo. JobBatch ON dbo.Job.

BatchID = dbo.JobBatch. OID GROUP BY dbo.Job. BatchID, dbo.JobBatch.

BatchDate HAVING (dbo.JobBatch. BatchDate > CONVERT(DATETIME, '2000-01-01 00:00:00', 102)) ORDER BY dbo.JobBatch. BatchDate, Total DESC.

Massively on target! Thnaks a million, bro. – Hassan Gulzar Oct 20 '10 at 14:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions