good afternoon; > On 2015-07-26, at 18:46, Nauman Ramzan <[email protected]> wrote: > > Dear James Anderson ! > Its a great favour from you. Thank you very much. > > How can I get oid of that offer which have minimum price / at-least one > offer id per product? > > Thank you again.
in case one wonders, as i am mostly at a loss when it comes to divining the consequences of a query with no insight into the dataset, i invited nauman here: http://dydra.com/nauman/question-prod-offers/@query#grouped-as-sub-select-of-sums <http://dydra.com/nauman/question-prod-offers/@query#grouped-as-sub-select-of-sums> and worked through several queries to illustrate to him, how a subselect and an aggregate work. > > Regards > Nauman > > On Sun, Jul 26, 2015 at 3:35 PM, buehmann < > [email protected]> wrote: > >> You still don't get the usage of GROUP BY in SPARQL I guess. >> You have to return the ?pid variable not only GROUP BY it. The reason is >> that the ?pid has to be projected to the outer query. >> >> And once you use GROUP BY, you can only return aggregates (min, max, etc) >> or variables that you're grouping by. That means, you have also to group by >> the ?condition variable. >> >> Lorenz >> >> >> […] best regards, from berlin, --- james anderson | [email protected] | http://dydra.com
