fixed sql to write tweets to db