diff --git a/docs/modules/ROOT/partials/base/table-expressions/select.adoc b/docs/modules/ROOT/partials/base/table-expressions/select.adoc index 6b88a35a..63e458e1 100644 --- a/docs/modules/ROOT/partials/base/table-expressions/select.adoc +++ b/docs/modules/ROOT/partials/base/table-expressions/select.adoc @@ -20,3 +20,12 @@ SELECT * FROM satellites SELECT Users, Apogee_km, Perigee_km FROM satellites ---- ==== + +.Exclude a subset of a table's columns +[example] +==== +[source,gensql] +---- +SELECT * EXCEPT Contractor, Country_of_Operator FROM satellites +---- +==== diff --git a/docs/modules/ROOT/partials/permissive/model-expressions/given.adoc b/docs/modules/ROOT/partials/permissive/model-expressions/given.adoc index c80a98b7..6985024d 100644 --- a/docs/modules/ROOT/partials/permissive/model-expressions/given.adoc +++ b/docs/modules/ROOT/partials/permissive/model-expressions/given.adoc @@ -1,12 +1,27 @@ === `+GIVEN+` +.Compute the probability of the satellite's period from the model, given the class of orbit. [example] ==== [source,gensql] ---- SELECT PROBABILITY OF Period_minutes - UNDER satellites_model GIVEN Class_of_Orbit + UNDER satellites_model + GIVEN Class_of_Orbit +FROM satellites +---- +==== + +.Compute the probability of the satellite's period from the model, given everything but the period, contractor, and operator's country. +[example] +==== +[source,gensql] +---- +SELECT + PROBABILITY OF Period_minutes + UNDER satellites_model + GIVEN * EXCEPT Period_minutes, Contractor, Country_of_Operator FROM satellites ---- ==== diff --git a/docs/modules/ROOT/partials/permissive/table-expressions/generate.adoc b/docs/modules/ROOT/partials/permissive/table-expressions/generate.adoc index a65a40ce..8bd86c9d 100644 --- a/docs/modules/ROOT/partials/permissive/table-expressions/generate.adoc +++ b/docs/modules/ROOT/partials/permissive/table-expressions/generate.adoc @@ -4,6 +4,7 @@ The `+GENERATE+` expression evaluates to a table of samples from a model. WARNING: The tables returned by `+GENERATE+` are infinite. A query comprised of a generate expression will run forever. In order to view the output if a `+GENERATE+` expression you should limit its output by wrapping it with a <> that includes a `+LIMIT+` clause. +.Generate 10 rows of three columns from the model [example] ==== [source,gensql] @@ -18,3 +19,19 @@ FROM LIMIT 10 ---- ==== + +.Generate 10 rows containing almost all columns from the model, but excluding 2 +[example] +==== +[source,gensql] +---- +SELECT * +FROM + GENERATE * + EXCEPT + VAR Contractor, + VAR Country_of_Operator + UNDER model +LIMIT 10 +---- +====