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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings