Here's a link to an article that discusses how to set up cross-tab queries.

http://www.devshed.com/Server_Side/MySQL/MySQLWiz/page1.html


-----Original Message-----
From: Michael Shulman [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 12:08 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Query formulation question


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]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to