X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D5EADD7AE2 for ; Thu, 25 Aug 2005 08:44:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39761-10 for ; Thu, 25 Aug 2005 11:44:34 +0000 (GMT) Received: from mx2.net2cyber.net (unknown [202.43.166.61]) by svr1.postgresql.org (Postfix) with ESMTP id C3A23D795C for ; Thu, 25 Aug 2005 08:44:30 -0300 (ADT) Received: from goliath.3wsi.net (unknown [202.43.166.77]) by mx2.net2cyber.net (Postfix) with SMTP id E894059E22 for ; Thu, 25 Aug 2005 19:19:31 +0700 (WIT) Received: (qmail 20418 invoked by uid 1026); 25 Aug 2005 11:44:26 -0000 Received: from richard@orbisindonesia.com by goliath.3wsi.net by uid 64011 with qmail-scanner-1.22 (sophie: 3.04/2.28/3.90. spamassassin: 2.60. Clear:RC:1(202.81.37.24):. Processed in 0.060627 secs); 25 Aug 2005 11:44:26 -0000 Received: from unknown (HELO vas.3wsi.net) (202.81.37.24) by 0 with SMTP; 25 Aug 2005 11:44:26 -0000 Received: (qmail 23901 invoked from network); 25 Aug 2005 11:44:00 -0000 Received: from unknown (HELO webmail.orbisindonesia.com) (202.81.37.24) by 0 with SMTP; 25 Aug 2005 11:44:00 -0000 Received: from 202.152.170.186 (SquirrelMail authenticated user richard@orbisindonesia.com); by webmail.orbisindonesia.com with HTTP; Thu, 25 Aug 2005 18:44:00 +0700 (WIT) Message-ID: <62683.202.152.170.186.1124970240.squirrel@202.152.170.186> Date: Thu, 25 Aug 2005 18:44:00 +0700 (WIT) Subject: How this query! From: "Richard Susanto" To: pgsql-admin@postgresql.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.098 required=5 tests=[AWL=0.048, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/310 X-Sequence-Number: 18629 Folks, would you like help me how to query this case. I have tbl_a, the fields are : item_record item_product_name item_qty if the data are : item_record = 1,2,3,4,5,6 item_product_name = a,b,a,c,d,c,... item_qty = 10,5,15,10,20,5,... How the query to sum item_qty_total if i want the result : item_product_name = a,b,c,d item_qty_total = 25,5,15,20 Regards, -- >>Richard Sitompul<< Software Engineer PT. Orbis Indonesia http://www.orbisindonesia.com http://richardsstp.3wsi.net