Allow sub requete on where clause with this API : http://pastebin.com/NS5uwwDd