Hi Michael,

I a not 100% sure if I understood you correctly, but what you want to do seems 
to be better made in the application itself, rather then the SQL code.

However you can use ALIASES together with the GROUP BY function and specify 2 
columns (Cars and COUNT(Monthofyear) which should list the items sperarately, 
but the formatting will still need to be made with your application.

Best regards

Nils Valentin
Tokyo/Japan


2003年 7月 24日 木曜日 04:47、Michael C. Podlesny さんは書きました:
> UGHH HELP!!
>
> I need to write a sql statement that will take the data from my table and
> use it as column headers.  For example,
>
> If I have a field named GoLiveDate and a field called Qty and a field
> called Cars:
>
> Cars  |  Qty  |  GoLiveDate
> ==================
> CarA |  5     |  7/21/2003
> CarA | 10    |  7/28/2003
> CarA | 14    |  8/1/2003
> CarB |  2     |  7/21/2003
> CarB | 3    |  7/28/2003
> CarB | 4    |  8/1/2003
> CarC |  7     |  7/21/2003
> CarC | 19    |  8/28/2003
> CarC |  44    |  9/1/2003
>
> The results should be
>
> Cars        July        August        September
> ==============================
> CarA        15            14                0
> CarB        5                4                0
> CarC        7                19            44
>
>
> Any help that you could give or point me to where I can find a solution
> would help.  I am getting stuck on making the Month name's of the dates the
> column headers
>
>
> Thanks,
> Mike

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


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

Reply via email to