At 12:25 +0200 6/12/03, Glenn wrote:
Hi,
I have this:
+----+-------+--------+
� Jahr � Name  � Budget  �
+----+-------+--------+
2003  Hans      2000
2003  Fritz       5000
2004  Hans      1500
2005  Pia         3500

How is it possible to make this in sql?

+---------------------+
� 2003   Hans    2000  �
� 2003   Fritz     5000  �
+---------------------+
� Total               7000  �
+---------------------+

+---------------------+
� 2004   Hans    1500  �
+---------------------+
� Total               1500  �
+---------------------+

+---------------------+
� 2005    Pia      3500  �
+---------------------+
� Total               3500  �
+---------------------+

Thanks a lot,
Glenn

Looks like you want separate results for each year present in your table. You can:

- Run a separate query for each year
or
- Run a single query from within a programming language that allows
  you to postprocess the results and display separate output for
  each year


-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to