[thelist] SQL query to create aging buckets

Joshua Olson joshua at waetech.com
Wed Dec 17 15:42:53 CST 2003

----- Original Message ----- 
From: "Jay Blanchard" <jay.blanchard at niicommunications.com>
Sent: Wednesday, December 17, 2003 4:30 PM

> *shimmering* A cross-tab query perhaps? 


The answer may be easier than you think.

SELECT datediff(d,duedate,getdate()), Count(*) AS TheCount
FROM tasks 
GROUP BY datediff(d,duedate,getdate())

Best of luck,

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list