Newer
Older
max_duration = 480L
trip = new.tableRef("trip", "PostgreSQL", "postgre.config", "public")
airport = new.tableRef("airport", "PostgreSQL", "postgre.config", "public")
q = subset(merge(query.from(trip), query.from(airport), by.x="depart", by.y="code"),
function(e) e$duration > max_duration,
c(city, arrival, duration))
results = query.force(q)
print(results)