Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EEC589FB875 for ; Tue, 24 Apr 2007 09:28:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 24634-01 for ; Tue, 24 Apr 2007 09:28:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp2.yandex.ru (smtp2.yandex.ru [213.180.200.18]) by postgresql.org (Postfix) with ESMTP id 440539FB7CF for ; Tue, 24 Apr 2007 09:28:23 -0300 (ADT) Received: from [82.209.238.118] ([82.209.238.118]:27403 "EHLO asup_tur" smtp-auth: "sql4-en" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3375785AbXDXM2N (ORCPT ); Tue, 24 Apr 2007 16:28:13 +0400 X-Comment: RFC 2476 MSA function at smtp2.yandex.ru logged sender identity as: sql4-en Date: Tue, 24 Apr 2007 15:31:33 +0300 From: Dmitry Turin X-Mailer: The Bat! (v2.01) Personal Reply-To: Dmitry Turin X-Priority: 3 (Normal) Message-ID: <7519129062.20070424153133@narod.ru> To: pgsql-sql@postgresql.org Subject: Re: We all are looped on Internet: request + transport = invariant In-Reply-To: <1177414707.737.69.camel@pampa> References: <14110647859.20070413105812@narod.ru> <20070413150936.GA31517@phlogiston.dyndns.org> <1684192906.20070419090827@narod.ru> <20070419134808.GB14187@phlogiston.dyndns.org> <814860828.20070420120819@narod.ru> <4628A08F.9050804@archonet.com> <1177072978.760.40.camel@pampa> <7939450187.20070420185808@narod.ru> <1177095450.760.71.camel@pampa> <1312216062.20070423112045@narod.ru> <1177329421.737.39.camel@pampa> <922322078.20070424105126@narod.ru> <1177414707.737.69.camel@pampa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.453 tagged_above=0 required=5 tests=AWL=-0.187, BAYES_50=0.001, URIBL_SBL=1.639 X-Spam-Level: * X-Archive-Number: 200704/225 X-Sequence-Number: 28225 Good day, Joe. J> "Fictional" is IMO not a good choice for J> describing aggregates, because it means "a story that is not true", J> whereas an SQL aggregate is something that is "true" (in the J> mathematical sense) but is "derived" from other values. It means, that TML and DDL aggregates have different sense. J> (I'm not sure what the special symbols mean -- maybe what you need first J> is a syntax reference for TML) http://sql4.by.ru/site/sql40/en/author/tree_eng.htm J> sum of the employees salaries? yes. "amount" is quantity of employees J> How do I see employees in just one department? department[id="1"].employee >>; or department[name="Technical"].employee >>; J> How do I see a single employee? employee[id="31"] >>; or employee[name="Tomson"] >>; -- maybe several employee with surname Tomson J> How do I see all employees that have a salary greater than 3500 department.employee[salary>3500] >>; J> ordered by their names? Now sorting for output is absent. I'm not sure, that it's necessary, but i already thought about this and continue to think. J> How do I actually retrieve SUM(salary) Declare field "sum" as not fictional. You can always declare field "sum" as not fictional and put sign "#" before field to prevent output of field. J> GROUP BY department? It is always "group by", because it is field of record "department" P.S. If you don't like to put sign "#" before field "sum", or you don't like absence of sorting NOW (it's possible, that i add sorting), then remember, that advantage is absence of gasket (php, etc) between DBMS and external world. That is more important for un-experienced users. Dmitry Turin http://html6.by.ru http://sql4.by.ru http://computer2.by.ru