x_date Date date sql.file.wizard manual x_id x_ID integer sql.file.wizard manual x_partner_categ_ids Partner Categories many2many sql.file.wizard manual res.partner.category Export Partners (Demo Data) SELECT name, street FROM res_partner; Export Partners With Variables (Demo Data) SELECT p.id FROM res_partner p LEFT JOIN res_partner_res_partner_category_rel rel ON rel.partner_id = p.id WHERE create_date < %(x_date)s AND id = %(x_id)s AND rel.category_id in %(x_partner_categ_ids)s