which drug has the legal status of prescription only medicines?
Entity Entity Entity Entity Entity
m.011z0 m.0569z m.01zfw m.01whr m.01_y8
Amoxicillin Modafinil Ciprofloxacin Chloramphenicol Carbamazepine
class entity
medicine.drug m.0ct7sw
medicine.drug medicine.drug_legal_status
Drug Prescription Only Medicines
none none
medicine.drug.legal_status
Legal status
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :medicine.drug . 
VALUES ?x1 { :m.0ct7sw } 
?x0 :medicine.drug.legal_status ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND medicine.drug (JOIN medicine.drug.legal_status m.0ct7sw))