SortedEntityClass

SortedEntityClass[class,prop]

represents an entity class derived from class by sorting according to the values of the property prop.

SortedEntityClass[class,prop"order"]

sorts according to prop in the order specified.

SortedEntityClass[class,{prop1,prop2,}]

breaks ties by successively using the values of the property specifications propi.

SortedEntityClass[class,sortspec,n]

represents the first n entities of class when sorted by sortspec.

SortedEntityClass[class,sortspec,{m,n}]

represents the entities m through n of class when sorted by sortspec.

Details

Examples

open allclose all

Basic Examples  (5)

Use SortedEntityClass to sort a class of entities:

Change the direction of the order:

Take only the first 10 entities:

Sort by multiple criteria:

When used with relational-database-backed entities, SortedEntityClass is equivalent to an ORDER BY statement:

Scope  (1)

The second argument of SortedEntityClass can be an EntityFunction:

Properties & Relations  (1)

When SampledEntityClass is applied to SortedEntityClass:

The same class can be more simply expressed by using SortedEntityClass with three arguments:

Neat Examples  (1)

Make a map of the 10 largest countries by population:

Wolfram Research (2019), SortedEntityClass, Wolfram Language function, https://reference.wolfram.com/language/ref/SortedEntityClass.html.

Text

Wolfram Research (2019), SortedEntityClass, Wolfram Language function, https://reference.wolfram.com/language/ref/SortedEntityClass.html.

CMS

Wolfram Language. 2019. "SortedEntityClass." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SortedEntityClass.html.

APA

Wolfram Language. (2019). SortedEntityClass. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SortedEntityClass.html

BibTeX

@misc{reference.wolfram_2024_sortedentityclass, author="Wolfram Research", title="{SortedEntityClass}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/SortedEntityClass.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_sortedentityclass, organization={Wolfram Research}, title={SortedEntityClass}, year={2019}, url={https://reference.wolfram.com/language/ref/SortedEntityClass.html}, note=[Accessed: 22-November-2024 ]}