R::findAll('posts', ' ORDER BY id DESC LIMIT 10');
select * from posts where 1 order by id desc limit 10
SELECT *
FROM some_table AS s1
WHERE s1.email NOT IN
(SELECT s1.email
FROM some_table AS s1
GROUP BY s1.email
HAVING count(*) > 1)
AND s1.phone NOT IN
(SELECT s1.phone
FROM some_table AS s1
GROUP BY s1.phone
HAVING count(*) > 1)
INSERT INTO table (column_list)
VALUES (value_list)
ON DUPLICATE KEY UPDATE
c1 = v1,
c2 = v2,
...;