Dear all,

I've been using MonetDB version 5 on Ubuntu machine for evaluating BSBM queries. The dataset and queries can be found here[1].

It seems that there are some queries that are not supported on MonetDB :
1) SELECT p.nr, p.label
  FROM product p, producttypeproduct ptp
  WHERE p.nr=ptp.product
AND "productType"=35
AND "propertyNum1">500
AND "propertyNum3"<2000
AND 168 IN (SELECT "productFeature" FROM productfeatureproduct WHERE productfeatureproduct.product=p.nr)
AND 147 NOT IN (SELECT "productFeature" FROM productfeatureproduct WHERE product=p.nr)
From the error, the subquery seems can't refer to the table alias "p".

2) SELECT distinct p.nr, p.label
  FROM product p, product po,
   (Select distinct pfp1.product FROM productfeatureproduct pfp1, 
   (SELECT "productFeature" FROM productfeatureproduct WHERE product=2) pfp2 
      WHERE pfp2."productFeature"=pfp1."productFeature") pfp
WHERE p.nr=pfp.product AND po.nr=2 AND p.nr <> po.nr
AND p."propertyNum1" < (po."propertyNum1"+120) AND p."propertyNum1" > (po."propertyNum1"-120)
AND p."propertyNum2" < (po."propertyNum2"+170) AND p."propertyNum2" > (po."propertyNum2"-170)
This is strange, because if I just comment one of the last 2 lines, the query works. But the last two lines can't be used together.

3) SELECT nr, label
    FROM product
    WHERE label like "%countries%";
It seems that MonetDB doesn't support regex.

4) SELECT *
   FROM (select label from product where nr=2) p left join 
      ((select o.nr as onr, o.price, v.nr as vnr, v.label from offer o, vendor v where 2=o.product AND
       o.vendor=v.nr AND v.country='GB' AND o."validTo">'2008-07-01') ov right join
       (select r.nr as rnr, r.title, pn.nr as pnnr, pn.name, r.rating1, r.rating2 from review r, person pn where r.product=2 AND
      r.person=pn.nr) rpn on (1=1)) on (1=1);
It seems that MonetDB can't do join with true condition because when I tried to run a simple query : 
   SELECT * FROM product p RIGHT JOIN offer o ON (1=1) 
Then MonetDB gives an error.

Could anyone please help me how to run the queries above?

Many thanks in advance.
Freddy




[1]  http://www4.wiwiss.fu-berlin.de/bizer/BerlinSPARQLBenchmark/spec/ExploreUseCase/index.html#queriesRelational