which calendar system shares a month with fewer than 31 days with the gregorian calendar system?
Entity Entity
m.03_n6 m.06jx2
Julian calendar Revised Julian calendar
class class entity literal
time.calendar time.month m.037d3 31^^http://www.w3.org/2001/XMLSchema#integer
time.calendar time.month time.calendar type.int
Calendar System Month Gregorian calendar 31
none none none <=
time.month.calendar_system time.month.calendar_system time.month.number_of_days_in_month
Calendar System Calendar System Number Of Days In Month
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 :time.calendar . 
?x1 :type.object.type :time.month . 
VALUES ?x2 { :m.037d3 } 
FILTER (?x3 <= "31"^^<http://www.w3.org/2001/XMLSchema#integer>)
?x1 :time.month.calendar_system ?x0 . 
?x1 :time.month.calendar_system ?x2 . 
?x1 :time.month.number_of_days_in_month ?x3 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x0 != ?x3 && ?x1 != ?x2 && ?x1 != ?x3 && ?x2 != ?x3  )
}
}
(AND time.calendar (JOIN (R time.month.calendar_system) (AND (JOIN time.month.calendar_system m.037d3) (le time.month.number_of_days_in_month 31^^http://www.w3.org/2001/XMLSchema#integer))))