Skip to content

Instantly share code, notes, and snippets.

@crssnky
Last active February 1, 2018 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crssnky/2a16b63d81ba4256460623e6505529bd to your computer and use it in GitHub Desktop.
Save crssnky/2a16b63d81ba4256460623e6505529bd to your computer and use it in GitHub Desktop.
PREFIX schema: <http://schema.org/>
SELECT ?name ?BMI1 ?BMI2 ?diff2
WHERE {
?s schema:name|schema:alternateName ?name;
schema:height ?height;
schema:weight ?weight.
bind((自分の身長)as ?myHeight).
bind((自分の体重)as ?myWeight).
bind((?weight/(?height*?height*0.01*0.01))as ?BMI1)
bind((?myWeight/(?myHeight*?myHeight))as ?BMI2)
bind(abs(?BMI1 - ?BMI2)as ?diff)
bind((?BMI2 - ?BMI1)as ?diff2)
filter(?weight>0)
}order by ?diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment