ODS.ODSeCRMGoodRelationsRef

  • Topic
  • Discussion
  • ODS.ODSeCRMGoodRelationsRef(Last) -- DAVWikiAdmin? , 2017-06-29 07:30:36 Edit WebDAV System Administrator 2017-06-29 07:30:36

    ODS eCRM GoodRelations? SPARQL Reference

    The following collection offers GoodRelations? SPARQL queries:

    Companies With Support Cases That Have Not Placed At Least One Order

    In other words get all Evaluators with Closed Support cases who haven't become Customers.


    PREFIX  ecrm: <http://demo.openlinksw.com/schemas/ecrm#>
    PREFIX  gr: <http://purl.org/goodrelations/v1#>
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    SELECT ?name ?case
    FROM <http://demo.openlinksw.com/ecrm>
    WHERE
      {
        ?comp a gr:BusinessEntity .
        ?comp foaf:name ?name .
        ?comp ecrm:is_company_of ?case .
        ?case a ecrm:Case.
        OPTIONAL{?comp ecrm:has_order ?order .
                             ?order a ecrm:Order }.
        FILTER (!bound (?order)).
      }
    

    Evaluators Who's Company Has Not Placed At Least One Order

    In other words get all Evaluators that haven't become customers.


    PREFIX ecrm: <http://demo.openlinksw.com/schemas/ecrm#>
    PREFIX gr: <http://purl.org/goodrelations/v1#>
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    SELECT ?name
    FROM <http://demo.openlinksw.com/ecrm>
    WHERE
      {
        ?comp a gr:BusinessEntity .
        ?comp foaf:name ?name .
        OPTIONAL {?comp ecrm:has_order ?order .
                              ?order a ecrm:Order }.
        FILTER (!bound (?order)).
      }
    

    Orders By Geo Location


    PREFIX ecrm: <http://demo.openlinksw.com/schemas/ecrm#>
    PREFIX gr: <http://purl.org/goodrelations/v1#>
    SELECT *
    FROM <http://demo.openlinksw.com/ecrm>
    WHERE 
      {
        ?order a gr:Offering .
        ?order ecrm:shipCountry ?country .
        FILTER (?country LIKE '%Russia%').
      }
    

    References