Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4D0681337B54 for ; Tue, 14 Dec 2010 14:14:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 16552-10 for ; Tue, 14 Dec 2010 18:14:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mail.postgresql.org (Postfix) with ESMTP id 6FA0113364DE for ; Tue, 14 Dec 2010 14:14:50 -0400 (AST) Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PSZOi-0002J2-Ts; Tue, 14 Dec 2010 11:14:48 -0700 Received: from [208.187.158.94] (helo=[172.16.1.35]) by in01.mta.xmission.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PSZOh-0004Sf-Tg; Tue, 14 Dec 2010 11:14:48 -0700 Message-ID: <4D07B415.1090108@gmail.com> Date: Tue, 14 Dec 2010 11:14:45 -0700 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Lightning/1.0b1 Thunderbird/3.0.10 MIME-Version: 1.0 To: emaratiyya CC: pgsql-sql@postgresql.org References: <1292311156150-3304147.post@n5.nabble.com> <4D0799F7.9050206@gmail.com> In-Reply-To: <4D0799F7.9050206@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-XM-SPF: eid=; ; ; mid=; ; ; hst=in01.mta.xmission.com; ; ; ip=208.187.158.94; ; ; frm=robjsargent@gmail.com; ; ; spf=neutral X-XM-AID: U2FsdGVkX1/5ltAs4uGpYPdumMh8WuTmXJcwKnuO0Sc= X-SA-Exim-Connect-IP: 208.187.158.94 X-SA-Exim-Mail-From: robjsargent@gmail.com X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;emaratiyya X-Spam-Relay-Country: Subject: Re: Using count on a join, group by required? X-SA-Exim-Version: 4.2.1 (built Fri, 06 Aug 2010 16:31:04 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201012/71 X-Sequence-Number: 34907 If you showed your work, you might get decent hints if not solutions. On 12/14/2010 09:23 AM, Rob Sargent wrote: > Shouldn't you be doing your own homework? > > emaratiyya wrote: >> Hi,Please help me solving this problem. I appreciate..Thankyou. >> >> Create the following table and insert few arbitrary records. Product >> (product_id, product_name, supplier_name, quantity, price_per_unit) >> You are required to create PL/SQL package that achieves the following >> functionalities: >> >> • Obtaining the product supplier name by using the product_id >> • Changing the price_per_unit by using the product_id >> • When changing the price of the product, you have to have PL/SQL >> code that >> keeps the history of the prices. For this functionality you need to >> create >> audit table: product_audit(product_id, old_price, new_price, >> date_of_change) >> • Updating the quantity by using the product_id >> • Get warning when the product level of stock (quantity) goes below >> certain >> threshold (e.g. 10) >> >>