<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getTriples(pointing):
 """Get all triples of a specified pointing ID. Defaults is to return a complete list triples."""


    sql="SELECT id FROM triples t join triple_members m ON t.id=m.triple"
    sql+=" join bucket.exposure e on e.expnum=m.expnum "
    sql+=" WHERE pointing=%s  group by id  order by e.expnum  "
    cfeps.execute(sql, ( pointing, ) )
    return(cfeps.fetchall())