Another SQL question that's confusing me today. I don't think that can be done in SQL alone; look into the DBMS's procedural language or the language used to render the data. Conceptually this could ...