How can I translate this 2 queries in postgresql ? :
CREATE TABLE `example` (
`id` int(10) unsigned NOT NULL auto_increment,
`from` varchar(255) NOT NULL default '0',
`message` text NOT NULL,
`lastactivity` timestamp NULL default '0000-00-00 00:00:00',
`read` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `from` (`from`)
) DEFAULT CHARSET=utf8;
Query:
SELECT *
FROM table_1
LEFT OUTER JOIN table_2 ON ( table_1.id = table_2.id )
WHERE (table_1.lastactivity > NOW()-100);