I don't think this is possible, but I would like to be proved otherwise.
I have written a simple report viewing class to output the results of various database queries. For the purpose of improving the display, when I have a report with grouped data, I would like to display the field value only on the first row of each unique value - and I would like to do this at the query level, or it would necessitate additional logic in my class to determine these special values.
It will probably help to illustrate my requirements with a simple example. Imagine this dataset:
Year Quarter Total
2008 Q1 20
2008 Q2 25
2008 Q3 35
2008 Q4 40
2009 Q1 15
2009 Q2 20
2009 Q3 30
2009 Q4 35
If possible, I would like the dataset returned as:
Year Quarter Total
2008 Q1 20
Q2 25
Q3 35
Q4 40
2009 Q1 15
Q2 20
Q3 30
Q4 35
Is there any way of doing this progammatically in MySQL?