## Query 1: Find element name, element symbol, atomic weight and color of ## all elements from the group with group name "Halogen" PREFIX table: PREFIX rdf: PREFIX xsd: SELECT (str(?n) as ?NAME) (str(?s) as ?SYMBOL) (str(?a) as ?ATOMICWEIGHT) (str(?c) as ?COL OR) { ?g rdf:type table:Group; table:name "Halogen"^^xsd:string; table:element ?e. ?e table:name ?n; table:symbol ?s; table:atomicWeight ?a; table:color ?c. } ## Query 2: Find element name, element symbol, atomic number and color of ## all elements with standardState "gas" and having an atomic number less ## than 10; Result should be sorted by atomic number (increasing) PREFIX table: PREFIX rdf: PREFIX xsd: SELECT (str(?n) as ?NAME) (str(?s) as ?SYMBOL) (str(?an) as ?ATOMICNUMBER) (str(?c) as ?CO LOR) { ?e table:name ?n; table:symbol ?s; table:atomicNumber ?an; table:color ?c; table:standardState table:gas. FILTER (?an < 10) } ORDER BY ?an ## Query 3: List all the possible individuals of the StandardState class PREFIX table: PREFIX rdf: SELECT * { ?aa rdf:type table:StandardState. } ## Query 4: Find element name, element symbol, atomic number and color of ## all elements in period number 3 and group number 14 (ordered by atomic number) PREFIX table: PREFIX rdf: PREFIX xsd: SELECT (str(?n) as ?NAME) (str(?s) as ?SYMBOL) (str(?an) as ?ATOMICNUMBER) (str(?c) as ?CO LOR) { ?e table:name ?n; table:symbol ?s; table:atomicNumber ?an; table:color ?c; table:period ?p; table:group ?g. ?p table:number 3. ?g table:number 14. } ORDER BY ?an ## Query 5: For each group, list the group name and count of elements in it PREFIX table: PREFIX rdf: PREFIX xsd: SELECT (str(?n) as ?GROUPNAME) (COUNT(?e) as ?NUMELEMENTS) { ?g rdf:type table:Group. ?g table:name ?n. ?g table:element ?e. } GROUP BY ?n -----------------------------------------------------------------------------------------