When I call this line:
select datetime(date, 'unixepoch', 'localtime') as "date", case when flags=3 then 'sent' else 'received' end as "from", address as phone, text as "message" from message;
I get an error message:
Error: near "[ LIST]": syntax error
What is going on and how can I fix it?