I have a table Orders that contains order information, and I need to produce reports that show the usage of the various input formats for orders. This needs to produce a report something like this:
| Format | # of Orders of this Format |
| web | 200 |
| FTP | 20 |
| unknown | 10 |
However, some of the rows in the Orders table will have Format='' (blank) and Format=NULL (a null field). For this report, I need to convert the Format field I query for to 'unknown' in both cases. How can I go about doing this? Bonus points if you can explain how I can produce a CSV ordered by Format in alphabetical order but where the line "Format,# of Orders of this Format" will always be the first line in the CSV regardless of alphabetical order.