SPARQL and TWINKLE
The best way to learn SPARQL is by doing it. Twinkle is a great tool you can use to apply SPARQL queries to DBpedia. With Twinkle, we can execute SPARQL queries against DBpedia and local rdf files.
Download zip file.
Do as follows:
unzip twinkle-2.0-bin.zip -d /usr/local/twinkle
add this to your ~/.bash_alias file
alias twinkle="cd /usr/local/twinkle && java -jar twinkle.jar"
The /usr/local/twinkle/example folder has *.rq files containing sample queries.