XMLWordPrintable

    Details

      Description

      We need to aggregate data on a daily basis that is available at an hourly rate. We had not find a way to do it.

      The function should trunc a datetime value to a date value.

      We would use such a function in the following way:

      prefix dcat: <http://www.w3.org/ns/dcat#>
      PREFIX qb: <http://purl.org/linked-data/cube#>
      prefix dct: <http://purl.org/dc/terms/>
      prefix vocab: <http://junar.com/cne/vocab/>
      prefix instances: <http://junar.com/cne/instances/>
      select ?myDate (AVG(?cost) as ?avg) where{
      graph <http://cne.opendata.junar.com/COSTO-MARGI-CDEC-SIC>

      { [] a qb:Observation; qb:dataSet ?dataset; vocab:datetimeDimension ?date; vocab:costoMarginal ?cost . }

      ?versionDataset dct:isVersionOf instances:dataset-costos-marginales-cdec-sic;
      dcat:distribution ?dataset .
      FILTER(?date >= "2012-01-01"^^xsd:dateTime)
      FILTER(?date < "2012-01-08"^^xsd:dateTime)
      BIND(xsd:date(?date) AS ?myDate)
      }group by ?myDate

        Attachments

          Activity

            People

            Assignee:
            igorkim igorkim
            Reporter:
            birdman Javier Pajaro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: