LIMIT 22, 10
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:SELECT * FROM tbl LIMIT 95,18446744073709551615;
SELECT MAX(meta.meta_value), game.title
FROM meta
INNER JOIN base ON game.id = meta.id_game
WHERE game.month = 2 AND game.year = 2016 AND meta.meta_key = 'video'
GROUP BY meta.id_games
ORDER BY game.score DESC, game.like DESC
LIMIT 10
SELECT
`resources`,
`command`,
MAX(`timestamp`)
FROM
`command`
WHERE
(
(
(`user_id` = 1000196805)
AND (
`command`.`resources` LIKE '%\"14\":%'
)
)
AND (`timestamp` >= 1439856000)
)
AND (`timestamp` <= 1439942400)
ORDER BY
`timestamp` DESC
GROUP BY
`resources`
скрипт выводит только строку title в таблице news
SELECT title FROM news
SELECT z.Nomer, GROUP_CONCAT(p.Name SEPARATOR ', ')
FROM Nakladnaya as n
INNER JOIN Product as p ON n.ProductID = p.ID
INNER JOIN Zakaz as z ON n.ZakazNomer = z.Nomer
GROUP BY z.Nomer
SELECT c.id_category as id, n.name as name, p.name as parent_name
FROM category as c
LEFT JOIN cat_info as n USING(id_category)
LEFT JOIN cat_info as p ON c.id_parent = p.id_category
select birthday
from some_table
order by dayofyear(birthday - interval dayofyear(now()) -1 day) asc
limit 3