X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 486059FA6A2 for ; Wed, 26 Jul 2006 01:00:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06098-05 for ; Wed, 26 Jul 2006 01:00:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 581429FA666 for ; Wed, 26 Jul 2006 01:00:43 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id m3so2995296ugc for ; Tue, 25 Jul 2006 21:00:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qRabx1dkMudYCElMABZgo62jhhuBTdMsl7aIf52/eAEM1O5BZg0vT+kgLb2DOMkbKD9VQFi2RYkZ3PNghPFOnZMGmUqOV35m5aNhCZVpLCYxNvbzVZQBEJyu2qx5pwHdgo9NnpbDoHJHmIOignoiXzNHGrr/hqjr63i729whVj0= Received: by 10.67.89.5 with SMTP id r5mr5443532ugl; Tue, 25 Jul 2006 21:00:42 -0700 (PDT) Received: by 10.67.98.7 with HTTP; Tue, 25 Jul 2006 21:00:42 -0700 (PDT) Message-ID: <36e682920607252100r5fbea54bh31f7a2fa29c7ea26@mail.gmail.com> Date: Wed, 26 Jul 2006 00:00:42 -0400 From: "Jonah H. Harris" To: "Andrew Hammond" Subject: Re: SQL generator Cc: pgsql-sql@postgresql.org In-Reply-To: <1153855895.203541.278400@i42g2000cwa.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1153395978.590189.261100@75g2000cwc.googlegroups.com> <1153855895.203541.278400@i42g2000cwa.googlegroups.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.402 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SARE_SPEC_SHORTQ, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/315 X-Sequence-Number: 25889 > > A typical query then may look like this: > > > > Select all 'toys' from 'Walmart' where average_sales(100) > 100000 and > > avaerage_cost(100,10) <= 1 and item_date between "01-Jan-00" and > > "01-Jan-06" See Microsoft's English Query for SQL Server or the SQ-HAL project for examples: http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part9/c3261.mspx?mfr=true http://www.csse.monash.edu.au/hons/projects/2000/Supun.Ruwanpura/ In general, it's easier to write the SQL than to optimize natural language-based query translation. -- Jonah H. Harris, Software Architect | phone: 732.331.1300 EnterpriseDB Corporation | fax: 732.331.1301 33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com Iselin, New Jersey 08830 | http://www.enterprisedb.com/