This is quite complicated with SQL. However, Microsoft Excel has excellent tools for creating crosstabs exactly like this.
-ms -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 9:56 AM To: [EMAIL PROTECTED] Subject: Query formulation question Hi there, I have some experience with SQL, but I'm drawing a blank on this one. I have a table with these fields: Location Unit StartDate StopDate I want to construct a SELECT statement to get to a report that looks something like this: Location1 Location2 Location3 ... Date1 count of units where Datex is between Date2 StartDate and StopDate ... Date3 ... Where Date1, Date2, etc are a week apart within a given date range. Any help appreciated. -Bob -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]