Short Term Rentals

SELECT node.nid as nid, node.title as ptitle , min(RR.field_nightly_rate_amount) as NR FROM node inner join term_node tn on (tn.nid=node.nid) inner join term_data td on (tn.tid=td.tid) LEFT JOIN content_field_r_property RP ON node.nid = RP.field_r_property_nid LEFT JOIN content_type_rental_rate RR ON RP.nid = RR.nid LEFT JOIN content_type_property ON node.vid = content_type_property.vid WHERE node.status <> 0 AND node.type = 'property' and (td.vid=1) and (td.tid = 1) GROUP BY node.nid ORDER BY NR ASC
Slide 2