In these queries, we combine and QUDT to work out the best price for a timed service. The first query gets the price, amount and units for a massage; the second converts the price to common time units for comparison.

These queries use data from the following sources:

Query ch14.6 Combining services for comparison visit query on

First, we look up the services that Plush offers, includingi the price, duration and units. Since the Plush markup uses the QUDT unit identifiers (since it is worthwhile to use a standard for such things), we don't need to do any further conversions to find the units.

Query ch14.7 Price comparison of two services visit query on

Now we can use QUDT to convert hours to minutes, and do a similar conversion on the price, working out a cost per minute for each massage. In the text, we use a SHACL function to do this conversion. does not (yet) support SHACL functions, so we just splice in the appropriate QUDT query instead.

The result is the price per minute of each service, making price comparison valid.