sql >> Databasteknik >  >> RDS >> Mysql

GROUP BY efter ORDER BY

SELECT id, idl
FROM (SELECT
    `pages`.`id` as id,
    `contents`.`id_language` as idl,
    [...]

[...]

ORDER BY
    FIND_IN_SET(`languages`.`id`, '3') DESC
     ) d
GROUP BY d.id


  1. Laravel LeftGå med var

  2. Uppdatera en orderkolumn MySQL?

  3. Mysql:PÅ DUBLIKATNYCKELUPPDATERA ALLA VÄRDEN?

  4. MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET