
xsparql.testcases-sparql-1.1.bsbm.bsbm-bi-q5.xsparql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xsparql-test-suite Show documentation
Show all versions of xsparql-test-suite Show documentation
XSPARQL compliance test suite
The newest version!
prefix bsbm:
prefix bsbm-inst:
prefix rev:
prefix xsd:
{for $country $product $nrofreviews $avgprice
from where{
{ select $country (max($nrofreviews) as $maxreviews)
{
{ select $country $product (count($review) as $nrofreviews)
{
$product a bsbm-inst:producttype1 .
$review bsbm:reviewfor $product ;
rev:reviewer $reviewer .
$reviewer bsbm:country $country .
}
group by $country $product
}
}
group by $country
}
{ select $product (avg(xsd:float(str($price))) as $avgprice)
{
$product a bsbm-inst:producttype1 .
$offer bsbm:product $product .
$offer bsbm:price $price .
}
group by $product
}
{ select $country $product (count($review) as $nrofreviews)
{
$product a bsbm-inst:producttype1 .
$review bsbm:reviewfor $product .
$review rev:reviewer $reviewer .
$reviewer bsbm:country $country .
}
group by $country $product
}
filter($nrofreviews=$maxreviews)
}
order by desc($nrofreviews) $country $product
return
{$maxreviews}
{$product}
{$avgprice}
{$nrofreviews}
{$country}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy