USoft Rule Language examples: GROUPED BY clause

Previous Next

USoft table constraint statements with GROUPED BY in the main clause are rare but legal. The GROUPED BY clause in USoft Rule Language may occur only as the clause immediately following FOR clause. In subqueries, GROUP BY must be used as in SQL.

USoft Rule Language

SQL Equivalent

FOR                customers cust
,                  car       car
CONNECTED AS       cust "USES" car
GROUPED BY         customers cust
,                  car       car

SELECT    cust.type
,         car.type
FROM      customer cust
,         car      car
RELATE    cust "USES" car
GROUP BY  cust.type
,         car.type
HAVING    count(*) > 1


See also

USoft Rule Language