On Sun, 18 Jan 2004, Nitin Mehta wrote:

> I need to select a column's value as different columns and other fields grouped by 
> those values.
>
> I want to select distinct values of reseller column as individual columns and other 
> data grouped on these values.

Since the approach of tables usually are that the columns are more static
than the number of rows, and the result you're striving for is that the
aggregations are more static than the number of resellers, wouldn't it
make more sense to use one row per reseller and one column per grouping?
You could easily accomplish this with the SELECT ... CASE ... control flow
function as documented at:
http://www.mysql.com/doc/en/Control_flow_functions.html

cheers,
Tobias

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

Reply via email to