Skip to content

Instantly share code, notes, and snippets.

@hamedqaderi
Created September 21, 2015 07:19
Show Gist options
  • Save hamedqaderi/8c62b6babe49b2a99052 to your computer and use it in GitHub Desktop.
Save hamedqaderi/8c62b6babe49b2a99052 to your computer and use it in GitHub Desktop.
SELECT food.id as id, food.name as name, images.name as image_name
FROM images INNER JOIN food
ON food_id = food.id
GROUP BY food_id
ORDER BY food.id DESC
LIMIT 6';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment