fixed wrong sql for activies