```
INNER JOIN chat_message_join ON message.ROWID = chat_message_join.message_id INNER JOIN chat ON chat.ROWID = chat_message_join.chat_id INNER JOIN chat_handle_join ON chat.ROWID = chat_handle_join.chat_id INNER JOIN handle ON handle.ROWID = chat_handle_join.handle_id LEFT JOIN message_attachment_join ON message.ROWID = message_attachment_join.message_id LEFT JOIN attachment ON attachment.ROWID = message_attachment_join.attachment_id ...
```
But it really wasn't that hard. I was able to programmatically send and receive iMessages. The problem (as the author pointed out) was that this changed, and didn't really work for the long. Although, I'm sure it could still be reveng'd – it's a pain in the ass, and (for me) not really worth it... =/